---- Reported by email@example.com 2008-03-05 06:56:57 ----
It was suggested that this process could be done upon installation, leaving the original files in Git in a format that's friendly to the developer.
--- Bug imported by firstname.lastname@example.org 2010-05-21 00:36 UTC ---
This bug was previously known as _bug_ 1918 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=1918
Actual time not defined. Setting to 0.0
I would like to address this one as part of performance work.
I found https://github.com/jshirley/Plack-Middleware-ComboLoader which got me pushed in right direction, but in the end I decided to implement Koha::Template::Plugin::Combine because it turned out that it's easier if we can use combining and minification together.
Changes are available at:
Minification alone doesn't buy us much:
minify js 334974 -> 311553 93.01%
minify css 148277 -> 133128 89.78%
minify js 382102 -> 362172 94.78%
minify css 134754 -> 123771 91.85%
But combining JS and CSS files together saves us round-trips to server:
OPAC 32 -> 20 requests
intranet 27 -> 13 requests
I would love to hear your feedback on this.
This seems to be related to the loading sequence of css and js we were discussing on irc the other day. I opened bug 7906 for it which may be a duplicate of this one.
I think any performance improvements should be pushed forward.
Created attachment 9112 [details] [review]
This provides new Koha::Template::Plugin::Combine which is intended
This plugin preserves order of included files when combining them.
Code need cleanup and documentation, but attaching it to bug will
provide easier way to try it out.
Created attachment 9917 [details] [review]
I test for curiosity :)
You need to create a koha-tmpl/intranet-tmpl/prog/en/combined directory with write mode for www-data
With firebug, I see 2 errors on the intranet detail page:
GET menu-button-arrow.png 404 Not Found
GET sprite.png 404 Not Found
21 requests 165.2 KB (159 KB from cache) 2.41s (onload: 2.5s)
9 requests 158.9 KB (146.2 KB from cache) 2.66s (121.8 KB JS + 24.3 KB CSS)
20 requests 167.8 KB (159 KB from cache) 1.6s (onload: 3.68s)
4 requests 158.2 KB (146.2 KB from cache) 4.04s (onload: 4.05s) (121.8 KB JS + 24.3 KB CSS)
We observe a decrease of the number of requests and data size, but also a small increase of the load time.
I don't know if you have checked the load time.
I did not test with Plack !
Thanks for rebase, I don't think this patch is really ready for sign-off so I'm changing status of this bug.
For one thing, it still has warn(s) in it, so RM will fail QA on it, and on the other there are a few references to Koha::Persistant which is my internal thingy to track usage and should be replaced with Koha::Cache code in future.
Any progress here?