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

some minor performance improvements for LinkingUtil. improve logging for CdgPass #5232

Merged
merged 5 commits into from
Jan 22, 2025

Conversation

bbrehm
Copy link
Contributor

@bbrehm bbrehm commented Jan 17, 2025

No description provided.

@bbrehm bbrehm requested a review from mpollmeier January 17, 2025 09:34
@@ -22,6 +22,8 @@ import org.slf4j.{Logger, LoggerFactory}
class CdgPass(cpg: Cpg) extends ForkJoinParallelCpgPass[Method](cpg) {
import CdgPass.logger

val hasLogged = java.util.concurrent.atomic.AtomicInteger(10)
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a comment why you chose 10..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't particularly care about the precise number -- it's just that, if a graph is broken in a way that triggers this log message often, then it tends to trigger this message very often, which takes forever (and spams the logs).

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, and I was aware that 10 is just an arbitrary number, but whenever the next reader sees an arbitrary number they might wonder 'why that number', so a short comment is helpful IMO

…/controlflow/codepencegraph/CdgPass.scala

Co-authored-by: Michael Pollmeier <[email protected]>
bbrehm and others added 2 commits January 17, 2025 13:09
…/controlflow/codepencegraph/CdgPass.scala

Co-authored-by: Michael Pollmeier <[email protected]>
@max-leuthaeuser max-leuthaeuser merged commit 4da71f8 into master Jan 22, 2025
5 checks passed
@max-leuthaeuser max-leuthaeuser deleted the bbrehm/somePerf branch January 22, 2025 11:44
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