This causes a very large number of CSS caches to be generated (one for every used combination of files, which is a lot!) and resend the same CSS code again and again, wasting bandwidth and breaking caching.

Instead, CSS should either:
a) Be loaded conditionally, but have $preprocess set to FALSE. This is appropriate for Admin or other "rare" CSS.
b) Be loaded on every page (yes, even if unneccessary for that actual page), and leave $preprocess set to TRUE. This is appropriate for CSS that you would expect an average visitor to need during a typical visit.

Obviously if we are going to use a split of these techniques for different files we will need more of a refactoring of the code (since type (b) should be added in hook_menu), but for the time being the attached patch fixes the immediate problem by simply setting $preprocess to FALSE.

Comments

owen barton’s picture

StatusFileSize
new865 bytes

NULL != defaults. It's late...

merlinofchaos’s picture

Status: Needs review » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.