Skip to content

#7225 make JarCache check interval configurable and raise default val…#7232

Merged
enebo merged 3 commits intojruby:jruby-9.2from
DirkMahler:jruby-9.2
Jun 10, 2022
Merged

#7225 make JarCache check interval configurable and raise default val…#7232
enebo merged 3 commits intojruby:jruby-9.2from
DirkMahler:jruby-9.2

Conversation

@DirkMahler
Copy link
Contributor

  • JarCache check interval is now configurable using the system property "jruby.jarCache.lastModifiedCheckInterval"
  • The default value has been raised to 750ms

@enebo
Copy link
Member

enebo commented Jun 1, 2022

@DirkMahler Thanks! I can do this if you don't want to but we will put all our options through org.jruby.util.cli.Options. This logic is nice because when you type 'jruby --properties' it shows all the properties we have with some documentation. Then typically we will access that value via org.jruby.RubyInstanceConfig. We do that so that it then become possible to change the config at runtime (I don't know if this is really important here but it is an optional idea -- is there any value in that?). If you do have time to make that change it would be great.

@enebo enebo added this to the JRuby 9.2.21.0 milestone Jun 1, 2022
@DirkMahler
Copy link
Contributor Author

Thanks for your feedback - I'll update the PR with the proposed changes.

@enebo enebo merged commit 588d878 into jruby:jruby-9.2 Jun 10, 2022
public static final Option<Boolean> USE_FIXNUM_CACHE = bool(MISCELLANEOUS, "fixnum.cache", true, "Use a cache of low-valued Fixnum objects.");
public static final Option<Integer> FIXNUM_CACHE_RANGE = integer(MISCELLANEOUS, "fixnum.cache.size", 256, "Values to retrieve from Fixnum cache, in the range -X..(X-1).");
public static final Option<Boolean> PACKED_ARRAYS = bool(MISCELLANEOUS, "packed.arrays", true, "Toggle whether to use \"packed\" arrays for small tuples.");
public static final Option<Integer> JAR_CACHE_UPDATE_CHECK_INTERVALL = integer(MISCELLANEOUS, "jarcache.updateCheck.intervall", 750, "The time (ms) between checks if a JAR file containing resources has been updated.");
Copy link
Member

@kares kares Jun 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would have been nice to have some better naming e.g. jar_cache.expiration.millis
or at least consistency with casing (jarcache vs updateCheck) within one option and avoid typos (interval - one l)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kares oh yeah the typo has to change anyways. Since we have fixnum.cache I think jar.cache.expiration and the description tells us the units.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DirkMahler That look ok to you?

Copy link
Contributor Author

@DirkMahler DirkMahler Jun 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've created another PR (#7259), just containing the requested name change (that I'm absolutely comfortable with).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants