Skip to content

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.

@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
@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