Skip to content

Understanding the time taken for analyzing queries using codeql cli #6020

Answered by rdmarsh2
kakashiUc asked this question in Q&A
Discussion options

You must be logged in to vote

Generally speaking, resolving call targets in Python isn't simply a matter of finding calls with a particular name, since Python doesn't provide static types for objects, and module members can potentially be redefined on the fly. Instead, we need to track the set of possible definitions for a function or method name at each point in the program, which is a rather expensive computation. The result of that analysis is then cached, so it only needs to be done once for each database. Also, note that in Python 3, the builtin print is a function instead a keyword, so it has the same potential to be shadowed or replaced as any other function name (and /python/ql/examples/snippets/print.ql does …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@thepurpleowl
Comment options

@tausbn
Comment options

Answer selected by adityasharad
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants