anaisbetts / SassAndCoffee

SassAndCoffee adds support in ASP.NET MVC to (you guessed it!) Sass/SCSS and CoffeeScript
http://blog.paulbetts.org/index.php/2011/06/06/new-release-sassandcoffee-0-9-now-not-glacially-slow/
Microsoft Public License
199 stars 37 forks source link

De-duplicate cache requests #41

Closed kogir closed 12 years ago

kogir commented 12 years ago

If multiple requests come in for a non-cached resource, start generation on the first request and hold all other requests for the same resource until they can be served from the new, cached copy.

Right now this is most noticeable when three or four Sass/SCSS requests for the same thing come in concurrently, and they all spin up Ruby runtimes at the same time.

kogir commented 12 years ago

I'm trialing support for this on my own site, based on 023a03e834fe90e7215ac2bd30072871ce558a6c It's hard to be sure it's safe, so I won't close it until I've developed better tests for it.

kogir commented 12 years ago

Fixed in 1e161f2d950efe425acdfeac1fc16f3eef5e876d

Before the most recent changes the SassCompiler would sometimes crash during initialization. If this happened while all other requests were waiting for the result of the compilation, it was bad news for everyone.