robolectric/robolectric — pull request #824 by danosipov (2013-11-07 20:38:33+00:00)
Title: Speed up resource reading by caching results of JAR file parsing.

In running tests on the latest 2.3-SNAPSHOT, we found our suite of 200 tests taking a minute and a half to run. Digging into the problem with VisualVM we discovered that a lot of time is spent in org.robolectric.res.Fs.JarFs constructor.

This PR caches the results of the run for each JAR, and speeds up subsequent accesses. Our test suite fell from 1.5 minutes to half a minute.