-
Notifications
You must be signed in to change notification settings - Fork 297
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
Conversation
@@ -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) |
There was a problem hiding this comment.
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..
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
...rontends/x2cpg/src/main/scala/io/joern/x2cpg/passes/controlflow/codepencegraph/CdgPass.scala
Outdated
Show resolved
Hide resolved
...rontends/x2cpg/src/main/scala/io/joern/x2cpg/passes/controlflow/codepencegraph/CdgPass.scala
Outdated
Show resolved
Hide resolved
…/controlflow/codepencegraph/CdgPass.scala Co-authored-by: Michael Pollmeier <[email protected]>
...rontends/x2cpg/src/main/scala/io/joern/x2cpg/passes/controlflow/codepencegraph/CdgPass.scala
Outdated
Show resolved
Hide resolved
…/controlflow/codepencegraph/CdgPass.scala Co-authored-by: Michael Pollmeier <[email protected]>
...rontends/x2cpg/src/main/scala/io/joern/x2cpg/passes/controlflow/codepencegraph/CdgPass.scala
Show resolved
Hide resolved
…/controlflow/codepencegraph/CdgPass.scala
No description provided.