Next performance pr I'd like to open, `handle_stri...
# development
b
Next performance pr I'd like to open,
handle_string_candidate
does
is_pragma_ignored_recursive
which walks the syntax tree upwards, but for files which don't contain the magic words (
# pants: no-infer-dep
) that's a guaranteed miss if the whole file doesn't contain it. It almost seems silly, but this is worth 8 seconds of cpu time per run on my private repo (though only 3 seconds of wall clock time). Thoughts?
h
You're suggesting a simple text-search as a heuristic before doing the treesitter thing?
b
It's a little silly, but it saves a surprising amount of cpu for me
w
Looking at the code in that dep inference, I’d believe it