Skip to content

Conversation

@michaelnebel
Copy link
Contributor

@michaelnebel michaelnebel commented Sep 30, 2025

In this PR we change the extractor to use * IDs for locations when extracting in BMN.

DCA looks good.

  • There are no changes to the reported alerts and the analysis time appears to be stable.
  • TRAP size is reduced around 5%.
  • TRAP import appears to be 15% faster.

@github-actions github-actions bot added the C# label Sep 30, 2025
@michaelnebel michaelnebel force-pushed the csharp/staridlocationsbuildless branch 4 times, most recently from bae56f5 to 3f12101 Compare October 8, 2025 11:19
@michaelnebel michaelnebel force-pushed the csharp/staridlocationsbuildless branch from 3f12101 to 3ee0e14 Compare October 9, 2025 12:05
@michaelnebel michaelnebel force-pushed the csharp/staridlocationsbuildless branch from 3ee0e14 to 199099c Compare October 9, 2025 12:13
@michaelnebel michaelnebel force-pushed the csharp/staridlocationsbuildless branch from 054a3a1 to 9ec0c9d Compare October 10, 2025 12:07
@michaelnebel michaelnebel marked this pull request as ready for review October 20, 2025 11:14
@michaelnebel michaelnebel requested a review from a team as a code owner October 20, 2025 11:14
Copilot AI review requested due to automatic review settings October 20, 2025 11:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies the C# extractor to use star IDs (* IDs) for source locations when extracting in BMN (Build Mode None) mode. The change is designed to improve extraction performance by reducing TRAP file size and eliminating location de-duplication overhead while maintaining transparency to end-users.

  • Added logic to use star IDs (*) instead of traditional location IDs when in standalone extraction mode
  • Updated location ID writing methods to conditionally output star IDs
  • Added change notes documenting the performance improvement

Reviewed Changes

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

File Description
csharp/ql/lib/change-notes/2025-10-10-starid-locations.md Documents the change to use star IDs for location extraction with performance benefits
csharp/extractor/Semmle.Extraction.CSharp/Entities/Locations/NonGeneratedSourceLocation.cs Implements conditional star ID writing for both quoted and unquoted location IDs in standalone mode

@michaelnebel michaelnebel requested a review from hvitved October 22, 2025 08:22
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

Hooray 🎉

@michaelnebel michaelnebel merged commit 6a02649 into github:main Oct 22, 2025
21 checks passed
@michaelnebel michaelnebel deleted the csharp/staridlocationsbuildless branch October 22, 2025 11:28
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