Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-11291

Avoid unnecessarily creating closure class files that already exist on disk

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • class generator, Compiler
    • None

    Description

      • 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 blackdrag 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            emge mgroovy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: