For years we have struggled to find a good way to handle Ruby resources inside jars. Simply using the JarFile APIs is often too slow, and delegating to URLClassLoader does not improve matters. In JRuby 1.7, we introduced caching logic into JRubyClassLoader for runtime-bound jars, which helped load times significantly, but it depended on URL handlers that are not compatible in all environments. JRuby 9k now has no caching of jar contents, and as a result we see issues like jruby/jruby#4185 where "fat jar" applications take significantly longer to load.
From my reading of Shrinkwrap docs, it could provide for us the following features:
- Cached loading of jar contents, both from filesystem and nested within other jars.
- URL protocol handling for those nested contents, to wire into normal classloading logic.
- Tar and tar.gz support, opening up the possibility of running Ruby gems directly from .gem files.
We should explore whether Shrinkwrap could help solve our many resource-loading problems.