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

Cache compiled build scripts #31

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

Comments

Projects
None yet
5 participants
@cbeams
Contributor

cbeams commented May 30, 2016

  • @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

@cbeams

This comment has been minimized.

Show comment
Hide comment
@cbeams

cbeams May 30, 2016

Contributor

@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.

Contributor

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 milestones: 1.0 M3, 1.0 M2 Jun 13, 2016

@cbeams

This comment has been minimized.

Show comment
Hide comment
@cbeams

cbeams Jun 13, 2016

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@cbeams

cbeams Jun 16, 2016

Contributor

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)
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@melix

melix Jun 17, 2016

Member

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)

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 milestones: 0.3.0, 1.0.0 Jul 6, 2016

@bamboo bamboo unassigned ligee Oct 7, 2016

@bamboo bamboo modified the milestones: 0.5.0, 1.0.0 Oct 7, 2016

@bamboo bamboo self-assigned this Oct 24, 2016

bamboo added a commit to gradle/gradle that referenced this issue Oct 27, 2016

Introduce CacheKeyBuilder service
Required to implement script caching in gradle-script-kotlin without
exposing `HashCode`.

See gradle/kotlin-dsl#31
+review REVIEW-6356

bamboo added a commit to gradle/gradle that referenced this issue Oct 27, 2016

Hash strings using UTF8 encoding for performance
Thanks for the tip, @lptr!

See gradle/kotlin-dsl#31
+review REVIEW-6356

bamboo added a commit to gradle/gradle that referenced this issue Oct 27, 2016

bamboo added a commit to gradle/gradle that referenced this issue Oct 27, 2016

bamboo added a commit to gradle/gradle that referenced this issue Oct 28, 2016

bamboo added a commit to gradle/gradle that referenced this issue Oct 28, 2016

@bamboo bamboo closed this in d9f4f46 Oct 31, 2016

@bamboo bamboo reopened this Oct 31, 2016

@bamboo bamboo added the epic label Nov 8, 2016

bamboo added a commit to gradle/gradle that referenced this issue Nov 8, 2016

Hash string before combining to minimize chance of collision
Which could arise given two string components ["foo", "barbaz"] versus
["foobar", "baz"].

See gradle/kotlin-dsl#31
+review REVIEW-6356

@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