-
Notifications
You must be signed in to change notification settings - Fork 16
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
Slow page loads #24
Comments
At a guess, the core autoprefixer library we are using is written in Javascript, so every time a CSS file needs to be prefixed, a node runtime needs to be booted up and executed. Is the build also significantly slower? Thoughts @porada ? |
That’s probably the reason. I’m not sure how we could improve it, though. |
@porada My only other guess is that it's running more times or on more files than expected. But otherwise, yeah. |
Checked
|
Is it possible to cache compiled assets if they haven't changed? Are most people these days working with middleman using gulp or webpack for builds? |
That’s a good idea. Unfortunately, it’s a non-trivial feature. |
I use webpack for JS, but autoprefixer and Sass for CSS. @porada I'm actually adding a bit of this kind of caching in core right now. I can extend it to autoprefixer as well |
Great, please do! Looking forward to see this in action. 💪 |
@tdreyno, any progress on caching? |
@porada core now emits file change events that try to handle includes and mixins. It's a bit broad, but would allow you to make a cache and invalidate it if you get a change event for the file path. |
@tdreyno, thanks for the update. Is this documented somewhere? |
You can see how the front matter extension is doing a little cache that gets invalidated on file changes, here: https://github.com/middleman/middleman/blob/master/middleman-core/lib/middleman-core/core_extensions/front_matter.rb#L30 |
Thanks, this is great. Opened #25 specifically for the implementation. Closing this issue for now. |
When I activate :autoprefixer page loads in development take a few seconds.
Why is this?
The text was updated successfully, but these errors were encountered: