Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
other
Priority:
Minor
Category:
Feature request
Assigned:
Reporter:
Created:
3 Mar 2009 at 20:29 UTC
Updated:
9 Dec 2015 at 16:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ainigma32 commentedSee here http://drupal.org/patch
Basically it's: create a patch, attach it to this issue, set the issue to patch (code needs review) and brace yourself ;-)
As mentioned in one of the pages on patching (I think) all new features are implemented in HEAD first. When applied the patch can be back ported to D6.
- Arie
Comment #2
marcus7777 commentedokay thanks I'm setting up the cvs and I'll make a patch thanks again Arie
Marcus
Comment #3
marcus7777 commentedpatch :
Comment #4
mr.baileysThanks for the patch!
Some comments after review:
Setting back to CNW for #1 and #2.
Out of curiosity, have you compared file size before and after the patch? I'd be interested to know how much the CSS files shrink after this change...
Comment #5
mr.baileysone more:
drupal_load_stylesheet(where other optimization is happening) instead ofdrupal_build_css_cache.Comment #6
marcus7777 commentedThanks you very much. Mr. baileys
I'll read the coding standards and look in to the
preg_replaceand see if I can move it todrupal_load_stylesheetI save about 300 - 500 bites on my sites (a bite per css command), so not a lot, but I like to have the smallest output I can.
Marcus
Comment #7
marcus7777 commentedI am new it using reg exp what am i doing wrong?
got this working
but how do I add it to the code in
drupal_load_stylesheet?Here is my attempt below (my line with <<<) got no errors just dus not 'Remove semi-colons on the ending declaration for a rule.'
Comment #8
marcus7777 commentedUpdating to support Request as I need help. thanks
Comment #9
ainigma32 commentedCouldn't you just do
'/;(\})/'?- Arie
Comment #10
marcus7777 commentedthanks Arie
I can't get that to work as part of preg_replace that's already there,
I could do:
but if it is speed we need :
I think is faster as it is simple. I was hoping to add it to the
preg_replacefunction, but it hard for me not knowing about Regular Expressions, but learning slowly.Comment #11
marcus7777 commentedComment #12
marcus7777 commentedhi
Looking in to the bytes save it is 2 bytes per css command so on testing 10 sites I saves about 1000 bytes per site. see how much you can save ;-}
Marcus
Comment #13
mr.baileysSetting back to feature request and CNR. This change will still need 2 positive reviews before it's ready to be committed...
Comment #14
marcus7777 commentedopps, yes I agree, thanks
Comment #16
philbar commentedSeems like a lot of work going into relatively small performance gain. Perhaps the CSSTidy module will be a good start for issues like these.
http://drupal.org/project/csstidy
Comment #17
wim leersVery simple change that is indeed a tiny performance improvement.
If you can get the tests passing, I'll mark it RTBC.
Comment #18
StevenWill commentedTry the attached patch.
Comment #19
StevenWill commentedUpdating status.
Comment #21
philbar commentedInstead of spending time work on this, I'd appreciate help getting CSSTidy ready for core as
css-optimize.incfile.With GZIP compression, changes like removing semi-colons aren't significant.
Comment #22
r13ose commentedSince CSSTidy is no longer being maintained, move to Advanced CSS/JS Aggregation.
There should be an update to see what marcus7777 is asking is either in the core or the module above.