Cassette Bundling very slow on live server

338 Views Asked by At

I'm struggling to find anything at all on the internet about how to resolve this...

We have an ASP.NET MVC3 based website which uses Cassette to do resource bundling. I'm currently deploying the website onto a server for live use but we're hitting problems. I have a staging/integration server where everything is hosted which is working just fine.

Using the same code and the same configuration, cassette bundling takes several minutes to complete when the AppPool "warms up" on the new server for live. I can tell it's cassette taking the time because I ran a Debug Diag analysis during the pause a few times and it consistently shows cassette is in the middle of a CoffeeScript bundling process. I had read on the Cassette website that CoffeeScript compilation can take a long time if the files are too big, but ours are quite small (we have about 6).

So my main question is: Is there anything that can severely hamper the performance of Cassette's initial bundling? Is it anything to do with the Isolated Storage Cassette uses to cache the bundles?

For reference the servers run IIS 7.5 on Windows Server 2008 R2.

Bonus round: When things do eventually load I see the error "Invalid operation when bundle has no assets". Confusingly there's no referenced bundle path that is empty. Once again everything works on our staging server but not on the "live" server.

Many thanks for any ideas at all.

UPDATE Setting the cassette configuration so debug=true seems to make everything work, including the "Bonus Round" problem. I'd quite like to use the benefits of not using debug mode like minification though so the question still stands.

1

There are 1 best solutions below

0
frattaro On

Removing the session module in the web.config worked for me. Although not a solution for everyone, the application I'm working on doesn't rely on it.