css optimisation - 48,139 unused selectors in 35 stylesheets (dust me selectors output)

i just ran 'dust me selectors' addin in firefox and spidered my whole 1.8.8 site.

as you can see from the heading. there was a surprisingly high amount of CSS.

21,909 used selectors
48,138 unused selectors

in 35 stylesheets.

looking at the list of stylesheets, i see:

ie6
ie7 

and a number of cached css files, each with progressively higher numbers of selector.. which i presume are old cached css files that have increased as i added more elements to them?

e.g. http://www.mysite.com/cache/css/default/elgg.1351852670.css 

so firstly, why are there so many of these numbered files? there are at least 20 of them..
aren't these meant to be being cleared when i press 'flush cache' in the admin area?

if i assume that most of these can be cleared somehow, leaving only one version of each file, the total selectors will drop to roughly 1350 unused and 850 used selectors. the unused ones include page elements that the spider app hasn't reached, such as system config pages/ messaging /friend picker.

does anyone have a smarter way of reducing the size of that unused list without going through each entry 1 by 1 and at the same time ensuring i don't remove any that are needed? (most likely i'll just leave most of them and only remove ones i have added that i know aren't needed any more - but maybe someone has some tips?)

thanks 

  • ok, do you know of a better way to do that than spidering with the plugin i used?

  • i realised what you asked here steve.. and looked. 

    something has cleared the issue though.. the dustme plugin now shows 1 set of all files, so i can use it correctly. and the cache numbers remain the same between page loads. perhaps it was a fix in 1.8.9.. 

    now i just need to reduce the page load of the homepage from 1.2MB.. ;)
    i notice that the elgg community is about 600k or so..
    that's another subject. 


     

Feedback and Planning

Feedback and Planning

Discussions about the past, present, and future of Elgg and this community site.