-
Notifications
You must be signed in to change notification settings - Fork 555
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
Problems with the current "asset dependencies" approach #443
Comments
I agree there is plenty of room for caching here. |
So before we start tweaking the deep mtime too much here, maybe we should try to get it as good as possible in AsseticBundle and have only the minimum support necessary in Assetic itself? That way we might be able to leverage the ConfigCache. |
@mpdude Think of us poor ZF2 users. |
@demonkoryu don't worry, this work will be done here |
If we had a helper class that collects the "deep" assets, maybe one could serialize and keep that for later requests. It would then be used to re-iterate those assets, check their last modified again and return whether or not one changed. If so, re-generate stuff as usual. That way, users only need to somehow keep one object and query it before they do the expensive stuff. Thoughts? I don't want to slip into re-inventing sf2's ConfigCache here. |
As of #362 we've got the possibility for filters to implement a particular interface for deep dependency extraction. If they do, they are presented the Assets' contents (in the state before they are applied) and can then return new Assets to indicate additional files that are relevant when it comes to re-generating/re-processing stuff.
Currently, these new Assets are just used to calculate a single "all dependencies included" last-modified-timestamp.
Problems with that:
I think we should focus on the second one. If we fix that, the first one is just some penalty incurred when we initially generate stuff and cache it.
One solution might be something similar to Symfony's ConfigCache - we need to "deep extract" the depended-on Assets (or files, or globs, or whatever). The next time we come back to validate a set of processed assets, we look at that list and mtimes and not use the extraction process again.
@kriswallsmith Please correct me if I am getting facts wrong.
The text was updated successfully, but these errors were encountered: