Cache compiled build scripts #31

Closed
cbeams opened this Issue May 30, 2016 · 4 comments

Projects

None yet

5 participants

@cbeams
Member
cbeams commented May 30, 2016 edited
  • @ligee to get back regarding how to control the location of compiled .kts scripts
@cbeams cbeams added this to the 1.0.0-M2 milestone May 30, 2016
@ligee ligee was assigned by cbeams May 30, 2016
@cbeams
Member
cbeams commented May 30, 2016

@ligee, I've assigned this issue to you, as we're waiting on info about the location of compiled .kts scripts. Just let us know and I'll assign it back to one of us to take the next steps.

@cbeams cbeams modified the milestone: 1.0 M3, 1.0 M2 Jun 13, 2016
@cbeams
Member
cbeams commented Jun 13, 2016

Slating this for M3 to ensure we get the most important features implemented by the M2 deadline. Note that while script caching will improve performance, it is less important in the context of the daemon being enabled by default.

@cbeams
Member
cbeams commented Jun 16, 2016

This is what we'll need to add to our compiler configuration to enable script caching

configuration.put(JVMConfigurationKeys.RETAIN_OUTPUT_IN_MEMORY, true)
configuration.put(JVMConfigurationKeys.OUTPUT_DIRECTORY, saveClassesDir)
@melix
Member
melix commented Jun 17, 2016

Copied from Slack:

Cédric> does it make sure it works properly cross-process? That is to say, uses the same guards/cache managers as the Groovy version?

[08:52]
There were quite a few bugs in the past wrt the Groovy scripts, for example 2 process using the same script file, but one is changed during the execution of the other. Using a simple directory for output doesn't work for this.

[08:53]
(that's why the caching strategy in FileCacheBackedScriptClassCompiler is complex (not speaking of the L1 in-memory cache)

@bamboo bamboo modified the milestone: 0.3.0, 1.0.0 Jul 6, 2016
@bamboo bamboo unassigned ligee Oct 7, 2016
@bamboo bamboo modified the milestone: 0.5.0, 1.0.0 Oct 7, 2016
@bamboo bamboo self-assigned this Oct 24, 2016
@bamboo bamboo added a commit to gradle/gradle that referenced this issue Oct 27, 2016
@bamboo bamboo Introduce CacheKeyBuilder service
Required to implement script caching in gradle-script-kotlin without
exposing `HashCode`.

See gradle/gradle-script-kotlin#31
+review REVIEW-6356
ce7400f
@bamboo bamboo added a commit to gradle/gradle that referenced this issue Oct 27, 2016
@bamboo bamboo Hash strings using UTF8 encoding for performance
Thanks for the tip, @lptr!

See gradle/gradle-script-kotlin#31
+review REVIEW-6356
6e6d3a9
@bamboo bamboo added a commit to gradle/gradle that referenced this issue Oct 27, 2016
@bamboo bamboo Rename method to better reflect its purpose
See gradle/gradle-script-kotlin#31
+review REVIEW-6356
712260a
@bamboo bamboo added a commit to gradle/gradle that referenced this issue Oct 27, 2016
@bamboo bamboo Fix BigInteger construction
See gradle/gradle-script-kotlin#31
+review REVIEW-6356
928a61d
@bamboo bamboo added a commit to gradle/gradle that referenced this issue Oct 28, 2016
@bamboo bamboo Favor Groovy literal syntax over BigInteger.valueOf
See gradle/gradle-script-kotlin#31
+review REVIEW-6356
f728973
@bamboo bamboo added a commit to gradle/gradle that referenced this issue Oct 28, 2016
@bamboo bamboo Support building cache key from ClassLoader
See gradle/gradle-script-kotlin#31
+review REVIEW-6356
f6dabc9
@bamboo bamboo added a commit that closed this issue Oct 31, 2016
@bamboo bamboo Cache compiled scripts
 - Introduce CachingKotlinCompiler
 - Add compilation ClassPath (as ClassLoader) to cache key
 - Add version number to script cache
 - Honor `--recompile-scripts`
 - Report compilation progress

Resolves #31
d9f4f46
@bamboo bamboo closed this in d9f4f46 Oct 31, 2016
@bamboo bamboo reopened this Oct 31, 2016
@eskatos eskatos was assigned by bamboo Oct 31, 2016
@bamboo bamboo added the epic label Nov 8, 2016
@bamboo bamboo added a commit to gradle/gradle that referenced this issue Nov 8, 2016
@bamboo bamboo Hash string before combining to minimize chance of collision
Which could arise given two string components ["foo", "barbaz"] versus
["foobar", "baz"].

See gradle/gradle-script-kotlin#31
+review REVIEW-6356
8afb9d8
@bamboo bamboo removed the epic label Nov 8, 2016
@bamboo bamboo closed this Nov 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment