Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Minification
I’ve been thinking on-and-off about the distribution size of Textpattern, in a similar vein to Bert here, but from the angle of someone in Upload Rate Hell. When I moved to Cornwall, my Internet upload speed was sub-200KBps, and I had to be very careful what went up the tubes. Now, it’s a different story (fibre), but I still have to use 3G on the occasions my telephone exchange goes down.
To that end, I’m curious about what can be done to reduce the size of the Textpattern distribution without sacrificing any functionality, during upload, installation and normal, everyday use. With that in mind: can the non-minified JS and CSS be minified instead of calling the full-fat versions? I mean go as far as minifying them and then deleting the non-minified versions. Files such as:
textpattern/textpattern.js
*.js
and*.css
intextpattern/themes
(note: a lot of Hive is already minified)
If browser caching and server-side compression/deflate is enabled, then the benefits will be slim, but the situations where this isn’t the case will see an advantage.
I’m going to try a test with 4.6-dev to see what sort of impact this has on page payload, but – as is most often the case for me around here – I’m not the smartest in the room on this subject, so additional brains would be helpful.
Last edited by gaekwad (2015-07-05 18:16:09)
Offline
Re: Minification
When I started working on taking PHPXref and creating PHPCrossref, my goal was to make the cross references as lite as possible. Two lines of thought, smaller cross-ref, where I can fit more on disk, and the speed of the rendered page, becuase Google did not particularly like the old PHPXref format.
So I used the YUI Compressor on the CSS and JavaScript files. The size reduction was small for the distributed cross-ref, but it did make a big difference in page size served to the browser. Google was happy, I was happy.
Saying all that, my host compresses pages going out, so minification may have been unnecessary, but it was a worthwhile experience trying to squeeze every byte out of a web page.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: Minification
Prior to 4.6 release, the admin themes and textpattern.js will be minified. That will actually make the download slightly heavier (because we will include unminified versions too for clarity) but daily use slightly lighter.
Offline
Re: Minification
philwareham wrote #292623:
Prior to 4.6 release, the admin themes and textpattern.js will be minified. That will actually make the download slightly heavier (because we will include unminified versions too for clarity) but daily use slightly lighter.
Ace. For completeness, can you confirm there will be at least one alpha/release candidate for us to pull apart before 4.6 hits the shelves proper?
Also, since Classic doesn’t seem to be actively worked on in anger, would I be out of line making minified files and updating the template to use said min’d files?
Offline
Re: Minification
The Classic/Remora themes will be worked on after Hive and the layout update is more finalised. There is no point in minifying it now really (in fact, I’ve stripped them out of the admin-layout-update branch temporarily to avoid confusion/breakage).
Offline
Re: Minification
philwareham wrote #292635:
The Classic/Remora themes will be worked on after Hive and the layout update is more finalised. There is no point in minifying it now really (in fact, I’ve stripped them out of the admin-layout-update branch temporarily to avoid confusion/breakage).
Ah, cool – makes sense. Thanks for clarification, Phil.
Offline
Pages: 1