yeoman/grunt-usemin — pull request #129 by tklae (2013-06-05 22:11:32+00:00)
Title: Performance improvement for cssprocessor by caching references

When running usemin on larger projects with the same image being referenced multiple times, the continuous lookup via the revvedfinder takes up quite a lot of time. If the already found reference is cached instead the processing is a lot faster.

Measurement on a fairly small project (15 images, 50 usages in CSS files):

Buildtime without fix:
Run1: 0m24.691s
Run2: 0m25.317s
Run3: 0m25.200s

Buildtime with cache:
Run1: 0m10.634s
Run2: 0m10.052s
Run3: 0m10.666s

Right now the caching has only been implemented for the cssprocessor, it might be useful to move the caching into or around the RevvedFinder itself.