Skip to content

fix/simplify indexing and speed up scanning - #162

Merged
n1ckl0sk0rtge merged 1 commit into
mainfrom
fix/speed-up-scanning
Apr 7, 2025
Merged

n1ckl0sk0rtge merged 1 commit into
mainfrom
fix/speed-up-scanning

Conversation

@san-zrl

@san-zrl san-zrl commented Apr 4, 2025

Copy link
Copy Markdown
Contributor
  1. Ignore .git folder during index
  2. Only generate project module if input file list is non-empty
  3. Move creation of JavaResourceLocator and JavaFrontend objects before the module loop in scan(). These objects need only be created once and can be reused (helps save quite some memory).
  4. Limit the sonar context scan batch size to 8G via .setProperty(SonarComponents.SONAR_BATCH_SIZE_KEY, 8 * 1024 * 1024).

@san-zrl
san-zrl requested a review from n1ckl0sk0rtge as a code owner April 4, 2025 16:53
@san-zrl
san-zrl removed the request for review from n1ckl0sk0rtge April 4, 2025 16:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

src/main/java/com/ibm/usecases/scanning/services/indexing/IndexingService.java:105

  • [nitpick] Consider renaming 'addProjectModuleFromDirectory' to something like 'tryAddProjectModuleFromDirectory' to clearer indicate that the method conditionally adds a project module only if the directory contains input files.
void addProjectModuleFromDirectory(

src/main/java/com/ibm/usecases/scanning/services/indexing/IndexingService.java:112

  • [nitpick] While the condition ensures no empty module is added, consider logging or handling the case where 'files' is empty for better traceability during debugging.
if (!files.isEmpty()) {

@n1ckl0sk0rtge
n1ckl0sk0rtge merged commit 8b01514 into main Apr 7, 2025
@n1ckl0sk0rtge
n1ckl0sk0rtge deleted the fix/speed-up-scanning branch April 7, 2025 08:51
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.

3 participants