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

Optionally run Plugin parsers after DB indexing #753

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

mcserep
Copy link
Collaborator

@mcserep mcserep commented Jun 20, 2024

CodeCompass currently builds database indexes for projects at the end of parsing. Previously this was fine, since little to no SELECT queries were executed during parsing, therefore it is unnecessary to maintain the indexes. However, the C++ metrics computation executes many SELECT queries on the C++ parsing result. The lack of these database indexes can greatly impair the performance.

Parsing Xerces I got the following measurement results:

  • If the database indexes are created at the beginning of parsing, the duration of C++ parsing is increased by 6%.
  • However, the type-level McCabe calculation time reduced from 9 minutes to 112 seconds (480% speedup).
  • Also, the Lack of Cohesion (type level again) reduced from 6 minutes to 5 seconds (7200% acceleration!).

Therefore this PR introduces an enhancement to optionally run Plugin parsers after DB indexing.

Copy link
Collaborator

@intjftw intjftw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one tiny change request, otherwise it seems fine.

parser/include/parser/abstractparser.h Outdated Show resolved Hide resolved
@mcserep mcserep force-pushed the parsing-after-indexing branch from a42d30e to 48b431c Compare June 21, 2024 06:09
@mcserep mcserep requested a review from intjftw June 21, 2024 06:09
@intjftw intjftw merged commit 6ce7855 into Ericsson:master Jun 21, 2024
12 checks passed
@mcserep mcserep deleted the parsing-after-indexing branch June 30, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants