clojure-emacs / orchard

A fertile ground for Clojure tooling
Eclipse Public License 1.0
326 stars 54 forks source link

[java] Improve Java parsing performance #237

Closed alexander-yakushev closed 7 months ago

alexander-yakushev commented 7 months ago

I've noticed that most of the time spent during running tests is calling source-info from different places.

alexander-yakushev commented 7 months ago

It doesn't seem to outright help with times on CI, but it does on my machine. I think these changes are useful nonetheless.

alexander-yakushev commented 7 months ago

@vemv Is there an explicit reason why Eastwood runs in each test job and not together with Kondo and others in a dedicated job?

EDIT: found the answer.

# Eastwood is run for every item in the CI matrix, because its results are sensitive to the code in the runtime,
# so we make the most out of this linter by exercising all profiles, JDK versions, etc.

Still, maybe limiting it to a single Java version at least makes sense?

vemv commented 7 months ago

Hi @alexander-yakushev !

Please explain the nature of the changes

Thanks - V

vemv commented 7 months ago

Still, maybe limiting it to a single Java version at least makes sense?

Not necessarily as Eastwood detects Java method deprecations - these vary per JDK

Plus, code evaluation can fail for arbitrary reasons - the chosen JDK is an important factor, so more JDKs == more coverage

vemv commented 7 months ago

Thanks much for the changes!

Hopefully this will make at least some difference.

I'll want to work on https://github.com/clojure-emacs/orchard/issues/211 sometime in the year.