-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching #20
Comments
Are you using the handler exclusively? I hadn't considered adding caching as it's usually only used in the debugging scenario, but I guess it's possible people are using it directly. |
No, not exclusively, it would be just nice to have some caching even if optimizations are disabled/debug mode, since it might take some time to compile bigger style-sheets (custom bootstrap theme in my case). |
So, the biggest difficulty here would be knowing if the file was still good or not when you are using partials because unfortunately we don't know what's going into the output css file. I'm gonna say this probably isn't feasible at this time. |
Well it doesn't have to depend on partial files, it could also be something like |
As of Beta-6 (not it nuget) the time needed to compile scss (foundation by zurb in my case) is up to 2-3 seconds. a huge slowdown occurs when the IIS process is restarted ( due to recompile or web.config change). When this happens an IIS app pool & site process restart is recommended. i'm still investigating as to why is this happening. |
I would greatly appreciate caching feature as I'd like to use the handler in production. |
I think caching could be implemented using built-in ASP.NET HTTP cache by providing |
@timkishkin this should have been fixed in latest versions of the library. |
The slowdown you've mentioned above is apparently fixed, right. But the caching is still missing, I think. I've checked the performance on a bootstrap scss, and the handler takes about 270ms in average to serve the main file. That is good enough, but still way slower than serving static file. It certainly doesn't cache the output, and such handler cannot be used in production, where I would like to use it (see explanation above). |
Are you using the handler directly, or are you using the bundling stuff? I think it's probably possible to add cache watching like that in general for development purposes. things get more complicated with doing something like that automatically for release builds as there can be issues when people run off a network share and exhausting unc resources from file watchers. |
Yes, I was planning to use handler directly in production, for reasons I've explained above. The absence of caching prevents me from doing that.
To be honest, I didn't think about it. Are you sure it would be an issue? I thought that ASP.NET bundling uses file watchers as well, as bundles are auto-updated after source file modifications (I might be mistaken, of course). |
In what kind of scenario do you want to use the caching?
My ideas :
|
My scenario is the 3rd one. OK, I will consider implementing the cache by myself when I have more time. Thank you for the explanation! |
definitely an issue that i've run into before. in general with sass, you end up having a file watcher on maybe like 1 - 2 files (root level scss) which is less of an issue, but once you start adding multiple watchers for single files (referenced by many includes) etc things start getting dicey. it's probably a non-issue right now though because i forgot that libsass still doesn't work with windows network paths 😄 |
Just wondering if you have any plans on adding caching support to the handler?
The text was updated successfully, but these errors were encountered: