From: merch-redmine@... Date: 2018-02-19T02:14:44+00:00 Subject: [ruby-core:85628] [Ruby trunk Feature#14489] MJIT needs a reusable cache Issue #14489 has been updated by jeremyevans0 (Jeremy Evans). sam.saffron (Sam Saffron) wrote: > It can use an ISEQ SHA1 hash as the key to the cache. If this feature is added, it should at least use SHA256 as the hash function. While the currently known SHA1 weaknesses may not matter in this particular case (if you are running untrusted code, you already have worse problems), it doesn't make sense to introduce usage of SHA1 in new code in cases where it is feasible to use a better hash function. ---------------------------------------- Feature #14489: MJIT needs a reusable cache https://bugs.ruby-lang.org/issues/14489#change-70416 * Author: sam.saffron (Sam Saffron) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- Currently on Discourse boot I notice a few minutes of jitting every time you boot it: This is a redacted output: https://gist.github.com/SamSaffron/4e18c2dacf476f1f27275f5b5d7bbb97 CPU is spinning hard compiling temp file after temp file for **minutes**: > JIT success (213.1ms): platform_string@/home/sam/.rbenv/versions/master/lib/ruby/gems/2.6.0/gems/bundler-1.16.1/lib/bundler/lazy_specification.rb:18 -> /tmp/_ruby_mjit_p6914u199.c and so on. Instead, mjit should have a reusable cache on disk it first tries fetching from prior to re-compiling. It can use an ISEQ SHA1 hash as the key to the cache. -- https://bugs.ruby-lang.org/ Unsubscribe: