jdaugherty commented on PR #16631:
URL: https://github.com/apache/grails-core/pull/16631#issuecomment-6378483128

   Three commits on the branch for the moment, 67ba541f11, 5ed78b9dee and 
44b44e9fb2:
   
   - **67ba541f11, the feature**, now with the H2 bracket fix from the last 
review: a bracket after whitespace or a comment is read both as a name and as 
the punctuation an array literal opens with, so `ARRAY ['x']` is withheld and 
`[name]` still recorded. Both threads are answered and resolved.
   - **5ed78b9dee, a memory leak in the compiler, kept separate because it is 
not part of the feature.** `AstUtils.isDomainClass` was `@Memoized`, an 
unbounded JVM-wide cache keyed by class name that pinned every `ClassNode` it 
was asked about, and with it the node's whole compile unit and class loader. 
Measured in a Gradle compiler fork after the grails-datamapping-core test 
compile: 194,420 `ClassNode`s and 154 `ModuleNode`s still held, 222 MB after a 
full collection, as the next compile started; with the fix, one `ModuleNode` 
and 76 MB. The verdict now lives as node metadata, which also ends the 
same-name collision #16653 had worked around. The memo dates from GORM itself 
(2015) and is on every branch, so it is backported as its own pull request 
against 7.0.x, #16747, to merge up; this commit goes once that reaches 9.0.x.
   - **44b44e9fb2 is a temporary diagnostic and will be dropped.** The MongoDB 
core test compile still runs out of its 2 GB on CI after the `where` closure 
went, including in the end-to-end lane where its main compile came from the 
cache, so that fork was fresh. Here the same compile takes 7 seconds and fits 
in 600 MB. The commit makes a fork that exhausts its heap print a class 
histogram into the build log and upload its heap dump from the end-to-end lane, 
so the next failure says what fills it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to