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
Exponential perf degradation during substituteGenerics (NTI) #2689
Comments
After changing all references to
Then, replacing |
Using yesterday's tip. Same performance issue as last March's version - not a regression. |
It's probably the issue discussed here: https://groups.google.com/forum/#!searchin/closure-compiler-discuss/NaivePersistentMap%7Csort:date/closure-compiler-discuss/bGWbLpsoVZU/rEElP2goDgAJ Can you check if using the Clojure data structures fixes it? |
Pretty sure I've already got Clojure 1.8 in the classpath, as that post was something I reported a while back and solved. I'll check again. |
Definitely not |
OK, I'll take a look and report back. It may be a few days though. |
Our moderately sized codebase uses extensive use of the externs attached. Over time, as we've build out these externs, and the corresponding code that uses them, we've seen an exponential degradation in performance, to the point where it's taking literally hours and gigabytes of memory to complete checks-only compilation.
Here's an example stacktrace after pausing in Eclipse once it's taken far too long already:
The problem appears to be due to some combination of the usages of:
|undefined
to allow properties to be optionalArray<...>
generic typesPerformance is improved by breaking up the structure of these externs type trees through changing various arrays to
Array<*>
and putting in casts at point of use.I've created a very simple example in the debugger, but it doesn't show any obvious performance problems. Probably it needs a larger real-world codebase, which I can't submit.
Externs in full, attached: externs.js.txt
The text was updated successfully, but these errors were encountered: