Sprinkle icon indicating copy to clipboard operation
Sprinkle copied to clipboard

Disable processing

Open JonoB opened this issue 12 years ago • 3 comments

Not quite sure if I am doing something wrong here, but even when I set $config['sprinkle']['disable_processing'] = TRUE; then assets are still minified and combined automatically. I understand from the docs that combining will still happen. But minifying should not, right?

I clear cache, then visit any page on my site, and all assets are combined and minifed.

On this point, I think that disable_processing should disable ALL processing, including combining and caching. Basically, disable_processing should just output the css and js files exactly as-is. Even cache file should not be created.

JonoB avatar Jan 09 '12 12:01 JonoB

Yes, I now see that this option does not work properly in all cases. My initial idea for this was to disable the checking of original assets to see if they have changed (checking them from the remote servers can have an affect on the loading speeds). Thank you for reporting this, I'll look into it.

By the way, if you want to disable minifying or combining, there are separate options in the configuration for this.

edmundask avatar Jan 09 '12 15:01 edmundask

Hi Edmund,

I think that the disable_processing is a brilliant feature. What I would suggest is that if its set to true, then absolutely no processing takes place - each asset should just be output using the js() and css() functions that you have in sprinkle. This will make the library super fast because you will not need to recurse through each directory, check file modification times, combine, etc, etc. You just output each asset individually and absolutely nothing else.

However, then the onus on the developer to make sure that they bake() the assets. Either through command line, or cron or through controller.

JonoB avatar Jan 09 '12 16:01 JonoB

I like the idea and it makes sense. I'll do some testing this week and try to integrate it nicely.

edmundask avatar Jan 09 '12 16:01 edmundask