Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor] Change the regex search to string search #3777

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

vodorok
Copy link
Collaborator

@vodorok vodorok commented Oct 24, 2022

The regex search() which intent to find codechecker source code comments are swappable with a much faster string.find() method. This will greatly improve performance of retrieving source code comments from the source files.

@vodorok vodorok requested a review from bruntib as a code owner October 24, 2022 23:35
@vodorok
Copy link
Collaborator Author

vodorok commented Oct 24, 2022

Created some profiling of the massStoreRun API endpoint on the server before and after the patch.
These are the stats of the stored report folder:

----======== Summary ========----
--------------------------------------------------------
Number of processed analyzer result files        | 698  
Number of analyzer reports                       | 49916
Number of source files                           | 645  
Number of source files with source code comments | 645  
Number of blame information files                | 0    
--------------------------------------------------------
----=================----
[INFO 2022-10-25 00:20:15] - Compressing report zip file...
[INFO 2022-10-25 00:20:17] - Compressing report zip file done (89.9MiB / 4.7MiB).

Before patch 71.6s:
image

After patch 30,6s:
image
The runtime of the modified function can be seen in detail here:
image

@vodorok vodorok added this to the release 6.21.0 milestone Oct 25, 2022
The regex search() which intent to find codechecker source code comments
are swappable with a much faster string.find() method.
This will greatly improve performance of retrieving source code comments
from the source files.
@bruntib
Copy link
Contributor

bruntib commented Oct 25, 2022

Wow, this is a great improvement! 😲

@bruntib bruntib merged commit 3c3d06d into Ericsson:master Oct 25, 2022
@vodorok vodorok deleted the store_speedup branch November 14, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants