mgroovy created GROOVY-11291:
--------------------------------

             Summary: Avoid unnecessarily creating closure class files that 
already exist on disk
                 Key: GROOVY-11291
                 URL: https://issues.apache.org/jira/browse/GROOVY-11291
             Project: Groovy
          Issue Type: Improvement
          Components: class generator, Compiler
            Reporter: mgroovy


* When rebuiling a Groovy class it often regenerates a large number of class 
files that represent closures inside the class, even though the closures did 
not change.
* This comes from the naming scheme of closure classes.
* This leads to the problem that these class files are needlessly uploaded to a 
server during development time and time again.
* According to Jochen a possible solution might be to hash compare the 
generated closure classes with the classes on the disk, and if an identical 
class is found, to use that instead of writing out a new class files.
* An alternative might maybe be to not number the closure classes, but to use 
the the hash value as part of their name, so that unchanged classes 
automatically keep the same name.
** This would make the names less readable, but more deterministic, but would 
require collision avoidance if two hashes do collide.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to