davioliveiraweb / spriteme

Automatically exported from code.google.com/p/spriteme
0 stars 0 forks source link

coolRunnings speedup #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
coolRunnings is 10x slower than last week. Below are three sites I tested
with the response time for index.php. I also included the full URL. Are you
seeing similar response times? (This will help determine if it's on my end,
like my network.)

eBay.com: 40 seconds
wordpress.com: 34 seconds
www.yahoo.com: 107 seconds

http://jaredhirsch.com/coolrunnings/index.php?t=1252523291543&format=json&absolu
te={%22canvas%22:%20{%22name%22:%22spriteme1%22,%20%22height%22:3741,%22width%22
:420,%20%22background-color%22:%22none%22,%22comments%22:%22normally%22},%22imag
es%22:[{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrMainN
avLft3.gif%22,%20%22top%22:10,%20%22left%22:10},%20{%22url%22:%22http://pics.eba
ystatic.com/aw/pics/globalHeader/imgHdrMainNavRgt3.gif%22,%20%22top%22:75,%20%22
left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/cmp/btn/btnFilms
tripBgHoriz.gif%22,%20%22top%22:140,%20%22left%22:10},%20{%22url%22:%22http://pi
cs.ebaystatic.com/aw/pics/buy/dailydeal/btnDDShowMe.gif%22,%20%22top%22:2560,%20
%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/cmp/btn/sprbt
nprimary.png%22,%20%22top%22:2615,%20%22left%22:10},%20{%22url%22:%22http://pics
.ebaystatic.com/aw/pics/globalAssets/imgHPHdrLftYellow.gif%22,%20%22top%22:2905,
%20%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalAsse
ts/imgPanelLLGreyGrad.gif%22,%20%22top%22:2935,%20%22left%22:10},%20{%22url%22:%
22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrSearchLft.gif%22,%20%22t
op%22:2965,%20%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics
/globalHeader/imgHdrSearchRgt.gif%22,%20%22top%22:3035,%20%22left%22:10},%20{%22
url%22:%22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrCatsLft2.gif%22,
%20%22top%22:3105,%20%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/
aw/pics/globalHeader/imgHdrCatsRgt2.gif%22,%20%22top%22:3160,%20%22left%22:10},%
20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrMainNavBgH
ighlight.gif%22,%20%22top%22:3215,%20%22left%22:10},%20{%22url%22:%22http://pics
.ebaystatic.com/aw/pics/cmp/ui/sprpanelcrns.png%22,%20%22top%22:3280,%20%22left%
22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalAssets/imgHPHdr
RgtYellow.gif%22,%20%22top%22:3691,%20%22left%22:10},%20{%22url%22:%22http://pic
s.ebaystatic.com/aw/pics/globalAssets/imgPanelLRGreyGrad.gif%22,%20%22top%22:372
1,%20%22left%22:10}]}

http://jaredhirsch.com/coolrunnings/index.php?t=1252523519967&format=json&absolu
te={%22canvas%22:%20{%22name%22:%22spriteme1%22,%20%22height%22:1147,%22width%22
:520,%20%22background-color%22:%22none%22,%22comments%22:%22normally%22},%22imag
es%22:[{%22url%22:%22http://wordpress.com/wp-content/themes/h4/i/signupbuttonbg.
png%22,%20%22top%22:10,%20%22left%22:10},%20{%22url%22:%22http://s.wordpress.com
/mshots/v1/http%3A%2F%2Fdigg.com%2Fimg%2Fbadges%2F32x32-digg-guy.gif?w=223%22,%2
0%22top%22:234,%20%22left%22:10},%20{%22url%22:%22http://s.wordpress.com/mshots/
v1/http%3A%2F%2Fashleyasaurora.wordpress.com%2F2009%2F09%2F09%2Fcomplete-irrespo
nsiblity-vs-complete-living%2F?w=223%22,%20%22top%22:477,%20%22left%22:10},%20{%
22url%22:%22http://technologizer.files.wordpress.com/2009/09/longandwindingroad.
png?w=223%22,%20%22top%22:664,%20%22left%22:10},%20{%22url%22:%22http://fortuneb
rainstormtech.files.wordpress.com/2009/09/screen-shot-2009-09-09-at-1-06-46-pm.p
ng?w=223%22,%20%22top%22:896,%20%22left%22:10}]}

http://jaredhirsch.com/coolrunnings/index.php?t=1252523682626&format=json&absolu
te={%22canvas%22:%20{%22name%22:%22spriteme1%22,%20%22height%22:4258,%22width%22
:738,%20%22background-color%22:%22none%22,%22comments%22:%22normally%22},%22imag
es%22:[{%22url%22:%22http://l.yimg.com/a/i/ww/thm/1/pgcurl_us_wid_052909.gif%22,
%20%22top%22:10,%20%22left%22:10},%20{%22url%22:%22http://l.yimg.com/a/i/ww/t4/s
box-bg.gif%22,%20%22top%22:145,%20%22left%22:10},%20{%22url%22:%22http://l.yimg.
com/a/i/ww/sp/icons_1.8.gif%22,%20%22top%22:424,%20%22left%22:24},%20{%22url%22:
%22http://l.yimg.com/a/i/ww/sp/trough_2.2.gif%22,%20%22top%22:1304,%20%22left%22
:10},%20{%22url%22:%22http://l.yimg.com/a/i/ww/sp/pa-icons3.gif%22,%20%22top%22:
3024,%20%22left%22:10},%20{%22url%22:%22http://l.yimg.com/a/i/us/we/31/b/34.gif%
22,%20%22top%22:4144,%20%22left%22:10},%20{%22url%22:%22http://us.i1.yimg.com/us
.yimg.com/i/ww/t4/events_s.gif%22,%20%22top%22:4195,%20%22left%22:10},%20{%22url
%22:%22http://l.yimg.com/a/i/nt/gr/li/2x2/003399.gif%22,%20%22top%22:4240,%20%22
left%22:10}]}

Original issue reported on code.google.com by stevesou...@gmail.com on 9 Sep 2009 at 7:19

GoogleCodeExporter commented 9 years ago
ebay is indeed crazy, crazy slow. 

Going to try looking at a profiler for the ebay call. Hoping it's something 
simple.

Original comment by jaredhir...@yahoo.com on 9 Sep 2009 at 10:06

GoogleCodeExporter commented 9 years ago
The problem is the call to pngcrush. Not only is it time-intensive, the single 
ebay
call takes my server load from 0.03 to about 0.6, which is very bad.

I've disabled it for jh.com/coolrunnings, but it is still enabled for
csscoolrunnings.com. 

What do we get for our trouble? In this case, not much:

39.12 KB (40062 bytes) <-- w/pngcrush
43.78 KB (44834 bytes) <-- no pngcrush

We're taking a huge time hit for nominal file-size savings. 

Temporary fix: I'm going to disable pngcrushing at jh.com and look for 
something more
efficient. To allow comparisons, I'm going to leave it enabled at 
csscoolrunnings.com
just for today.

no pngcrush:

http://jaredhirsch.com/coolrunnings/index.php?t=1252523291543&format=json&absolu
te={%22canvas%22:%20{%22name%22:%22spriteme1%22,%20%22height%22:3741,%22width%22
:420,%20%22background-color%22:%22none%22,%22comments%22:%22normally%22},%22imag
es%22:[{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrMainN
avLft3.gif%22,%20%22top%22:10,%20%22left%22:10},%20{%22url%22:%22http://pics.eba
ystatic.com/aw/pics/globalHeader/imgHdrMainNavRgt3.gif%22,%20%22top%22:75,%20%22
left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/cmp/btn/btnFilms
tripBgHoriz.gif%22,%20%22top%22:140,%20%22left%22:10},%20{%22url%22:%22http://pi
cs.ebaystatic.com/aw/pics/buy/dailydeal/btnDDShowMe.gif%22,%20%22top%22:2560,%20
%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/cmp/btn/sprbt
nprimary.png%22,%20%22top%22:2615,%20%22left%22:10},%20{%22url%22:%22http://pics
.ebaystatic.com/aw/pics/globalAssets/imgHPHdrLftYellow.gif%22,%20%22top%22:2905,
%20%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalAsse
ts/imgPanelLLGreyGrad.gif%22,%20%22top%22:2935,%20%22left%22:10},%20{%22url%22:%
22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrSearchLft.gif%22,%20%22t
op%22:2965,%20%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics
/globalHeader/imgHdrSearchRgt.gif%22,%20%22top%22:3035,%20%22left%22:10},%20{%22
url%22:%22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrCatsLft2.gif%22,
%20%22top%22:3105,%20%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/
aw/pics/globalHeader/imgHdrCatsRgt2.gif%22,%20%22top%22:3160,%20%22left%22:10},%
20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrMainNavBgH
ighlight.gif%22,%20%22top%22:3215,%20%22left%22:10},%20{%22url%22:%22http://pics
.ebaystatic.com/aw/pics/cmp/ui/sprpanelcrns.png%22,%20%22top%22:3280,%20%22left%
22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalAssets/imgHPHdr
RgtYellow.gif%22,%20%22top%22:3691,%20%22left%22:10},%20{%22url%22:%22http://pic
s.ebaystatic.com/aw/pics/globalAssets/imgPanelLRGreyGrad.gif%22,%20%22top%22:372
1,%20%22left%22:10}]}

with pngcrush:

http://csscoolrunnings.com/service.php?t=1252523291543&format=json&absolute={%22
canvas%22:%20{%22name%22:%22spriteme1%22,%20%22height%22:3741,%22width%22:420,%2
0%22background-color%22:%22none%22,%22comments%22:%22normally%22},%22images%22:[
{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrMainNavLft3.
gif%22,%20%22top%22:10,%20%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic
.com/aw/pics/globalHeader/imgHdrMainNavRgt3.gif%22,%20%22top%22:75,%20%22left%22
:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/cmp/btn/btnFilmstripBgH
oriz.gif%22,%20%22top%22:140,%20%22left%22:10},%20{%22url%22:%22http://pics.ebay
static.com/aw/pics/buy/dailydeal/btnDDShowMe.gif%22,%20%22top%22:2560,%20%22left
%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/cmp/btn/sprbtnprimar
y.png%22,%20%22top%22:2615,%20%22left%22:10},%20{%22url%22:%22http://pics.ebayst
atic.com/aw/pics/globalAssets/imgHPHdrLftYellow.gif%22,%20%22top%22:2905,%20%22l
eft%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalAssets/imgP
anelLLGreyGrad.gif%22,%20%22top%22:2935,%20%22left%22:10},%20{%22url%22:%22http:
//pics.ebaystatic.com/aw/pics/globalHeader/imgHdrSearchLft.gif%22,%20%22top%22:2
965,%20%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/global
Header/imgHdrSearchRgt.gif%22,%20%22top%22:3035,%20%22left%22:10},%20{%22url%22:
%22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrCatsLft2.gif%22,%20%22t
op%22:3105,%20%22left%22:10},%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics
/globalHeader/imgHdrCatsRgt2.gif%22,%20%22top%22:3160,%20%22left%22:10},%20{%22u
rl%22:%22http://pics.ebaystatic.com/aw/pics/globalHeader/imgHdrMainNavBgHighligh
t.gif%22,%20%22top%22:3215,%20%22left%22:10},%20{%22url%22:%22http://pics.ebayst
atic.com/aw/pics/cmp/ui/sprpanelcrns.png%22,%20%22top%22:3280,%20%22left%22:10},
%20{%22url%22:%22http://pics.ebaystatic.com/aw/pics/globalAssets/imgHPHdrRgtYell
ow.gif%22,%20%22top%22:3691,%20%22left%22:10},%20{%22url%22:%22http://pics.ebays
tatic.com/aw/pics/globalAssets/imgPanelLRGreyGrad.gif%22,%20%22top%22:3721,%20%2
2left%22:10}]}

Original comment by jaredhir...@yahoo.com on 9 Sep 2009 at 10:27

GoogleCodeExporter commented 9 years ago
Found a workable compromise.

The command that had been used at jh.com included the '-brute' call to pngcrush,
which meant pngcrush looped through 130 different algorithms instead of the 
default 10.

By simplifying the pngcrush call, response time is way improved, and server 
load is
much lower.

Putting this into production at both sites; leave a message here if it slows 
down again.

Original comment by jaredhir...@yahoo.com on 9 Sep 2009 at 11:32

GoogleCodeExporter commented 9 years ago
marking as fixed because it seems to be working really nicely. Reopen if it 
doesn't
seem so nice to you :-)

Original comment by jaredhir...@yahoo.com on 9 Sep 2009 at 11:49