SonarQube PHP
  1. SonarQube PHP
  2. SONARPHP-229

Import of Violations is too slow for large projects

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.4
    • Fix Version/s: 0.5
    • Component/s: None
    • Labels:
      None
    • Environment:
      Large PHP Projects > 1000 of files with lots of violations
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      For a large PHP projects with lots of it takes too long to import Codesniffer/PHPMD violations. (I have a Project where it takes about 7 hours)

      The reason is that for every violation the whole Source-Directories tree is scanned.

      In earlier versions (0.2-0.3) there was no such problem.

      The attached patch solves this problem.

      1. PhpFile.patch
        2 kB
        Gennadiy Litvinyuk

        Issue Links

          Activity

          Hide
          Gennadiy Litvinyuk added a comment -

          The attached patch has reduced the import time from about 7 hours to 7 minutes in one project.

          Show
          Gennadiy Litvinyuk added a comment - The attached patch has reduced the import time from about 7 hours to 7 minutes in one project.
          Hide
          Akram Ben Aissi added a comment -

          Hi Gennadiy
          thank you for the submitting the patch. It could not be added as is, because of a previous issue, that is linked to this.
          However, another fix is pending, to avoid looking on filesystem everytime we want to check if files is present in project.

          Show
          Akram Ben Aissi added a comment - Hi Gennadiy thank you for the submitting the patch. It could not be added as is, because of a previous issue, that is linked to this. However, another fix is pending, to avoid looking on filesystem everytime we want to check if files is present in project.
          Hide
          Akram Ben Aissi added a comment -

          Source files list and test files list are now cached.

          Show
          Akram Ben Aissi added a comment - Source files list and test files list are now cached.
          Hide
          Fabrice Bellingard added a comment -

          Tested, looks fine.

          Show
          Fabrice Bellingard added a comment - Tested, looks fine.

            People

            • Assignee:
              Akram Ben Aissi
              Reporter:
              Gennadiy Litvinyuk
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: