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

High memory usage while analyzing the classpath #2189

Open
vemv opened this issue Sep 19, 2023 · 2 comments
Open

High memory usage while analyzing the classpath #2189

vemv opened this issue Sep 19, 2023 · 2 comments

Comments

@vemv
Copy link
Contributor

vemv commented Sep 19, 2023

version

Latest

platform

Vanilla JVM, and lein-clj-kondo

problem

A problem I've experienced from time to time (dating back to around 2020-21), including today in a modern project, is that clj-kondo requires too much memory usage while analyzing the classpath.

The command I've tried is:

lein clj-kondo --copy-configs --dependencies --parallel --lint '$classpath'

That requires at least 4GB memory (I didn't try a invocation that would succeed, since that would require a paid CircleCI plan for an OSS project)

repro

Can be provided on request. The target project is https://github.com/clojure-emacs/cider-nrepl - it's getting its kondo setup revamped this week.

...Most of all, I'm wondering if this also feels for you like a problem that is present and that shows up from time to time.

Perhaps this analysis could be sub-divided into chunks, such that at no point there are objects representing the whole classpath's AST (or something like that. I don't know kondo's internals off hand).

Thanks - V

@borkdude
Copy link
Member

I wonder if disabling --parallel helps here

@vemv
Copy link
Contributor Author

vemv commented Sep 20, 2023

Tried just now, sadly it also failed

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

No branches or pull requests

2 participants