documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

`#{java} -version 2>&1` every page load in development #36

Closed ghazel closed 14 years ago

ghazel commented 14 years ago

This is only a minor nuisance, but perhaps it could be improved. It seems that every page load in development mode causes Jammit.reload!, which in turn checks the java version with #{java} -version 2>&1. This takes a bit of time - more than anything else on my pages. package_assets is set to "on", which prevents Jammit from actually doing anything with Java in development anyway.

Could this check be cached, or changed to only run if packaging will occur?

jashkenas commented 14 years ago

Oh my, that's quite an oversight. Thanks for reporting it. I've pushed a patch that only runs the test and the error once, on startup. Closing the ticket.