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
Make Activate/Deactivate plugins and themes super fast! #4373
Comments
Dividing Less files would remove the ability for third-party plugins to override global Less variables. Furthermore, most of the time is spent in minifying JavaScript files. We will only separate JavaScript files. An additional improvement will be committed :activating/deactivating plugins without JavaScript files will no longer trigger a full merging process. |
it's now slick to enable third party plugins & themes... |
In 8e9f6fc: refs #4373 I had to make this change to force reloading the css in case the compiled css changes without a version change Following scenario: The current cache buster is based on Piwik version + Plugin versions. That means, when a less file changes but no version the browser will still use the "cached CSS" as the cache buster does not change. Therefore I have to build a cacheBuster value based on the content of the compiled CSS file to invalidate the cached CSS file in the browser and to force the reloading. As far as I can see this change does not have any huge performance implications as it builds a hash based on the already compiled CSS file and only tries to regenerate the compiled CSS file if it does not exist. |
… that cannot be loaded. catching exception when trying to "uninstall" the plugin.
…f it did not exist before and fix it also was not regenerated if a plugin was not updated. Therefore include the version number in the cache buster.
… css in case the compiled css changes without a version change Following scenario: There is a plugin that generates css/less files dynamically from time to time but the Plugin version does not change as there is no plugin update. Only the less file changes. When the less file changes, the plugin deletes the merged asset file as well. The current cache buster is based on Piwik version + Plugin versions. That means, when a less file changes but no version the browser will still use the "cached CSS" as the cache buster does not change. Therefore I have to build a cacheBuster value based on the content of the compiled CSS file to invalidate the cached CSS file in the browser and to force the reloading. As far as I can see this change does not have any huge performance implications as it builds a hash based on the already compiled CSS file and only tries to regenerate the compiled CSS file if it does not exist.
…is method public for my previous change in the view
When Activating or deactivating a plugin, on the new page view, the Javascript and CSS file will be re-processed. Currently it takes up to 20 secondes (ouch)! This is because the JS and CSS files are huge in size: they include all core files, as well as third party plugins files.
Proposed solution:
This new file is very small (since there are few third party plugins, especially atm). This file is easy and fast to re-process.
Notes:
The text was updated successfully, but these errors were encountered: