My favorites | Sign in
Project Home Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 15: CoolRunnings: size comparison
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  jaredhir...@yahoo.com
Closed:  Sep 2009


 
Project Member Reported by stevesou...@gmail.com, Sep 1, 2009
In addition to showing the reduction in HTTP requests, it'd be nice to show
byte savings. We could do this in CoolRunnings. It has to download all the
individual images, and also knows the size of the resultant sprite. Adding
this to the json response would work.
Sep 1, 2009
Project Member #1 stevesou...@gmail.com
(No comment was entered for this change.)
Owner: jaredhir...@yahoo.com
Sep 1, 2009
Project Member #2 stevesou...@gmail.com
(No comment was entered for this change.)
Labels: Milestone-Release1.0
Sep 3, 2009
Project Member #3 stevesou...@gmail.com
I added size.cgi which returns the Content-Length of images in a script. It's slow -
you have to run it on all the images. I'll add a new issue to handle batch mode.
Status: Fixed
Owner: stevesoudersorg
Sep 6, 2009
Project Member #4 stevesou...@gmail.com
size.cgi works, but I'm not happy about the load it puts on spriteme.org, and also
not happy about the traffic it generates requesting every image in the page. It would
be better to go back to the original idea and embed this functionality in
coolRunnings to return the total size of all the individual images as well as the
size of the resultant sprite.
Status: Accepted
Owner: jaredhir...@yahoo.com
Sep 9, 2009
Project Member #5 jaredhir...@yahoo.com
OK. CooLrunnings is already downloading all the images, so it shouldn't be hard to
get their sizes.
Sep 9, 2009
Project Member #6 stevesou...@gmail.com
notes to myself: When coolRunnings supports this, modify these parts of spriteme.js:

    updateHtml: function() {
        // TODO - This is temporary until we get height&width and size in the
coolRunnigs response.
        if ( !this.bgImages[0].width || !this.bgImages[0].size ) {
            var spriteObj = this;
            setTimeout(function() { spriteObj.updateHtml(); }, 500);



    if ( -1 === iLink ) {
        //SpriteMe_autospriteCallback();
        // TODO - Right now, there's a race condition with size.cgi. That'll go away when
        // coolRunnings returns the file size. For now, do a setTimeout.
        setTimeout(SpriteMe_autospriteCallback, 3000);


Sep 11, 2009
Project Member #7 stevesou...@gmail.com
It would be cool to return three things:
  1 - total size of all the input images
  2 - size of the resulting sprite image
  3 - dimensions of the sprite image (width & height)

I'm fine if you want to return saved bytes, but I can get that from the delta of 1 & 2.

Sep 11, 2009
Project Member #8 jaredhir...@yahoo.com
Here's the new json output. I can make changes to the formatting; just ask.

var coolRunnings =
{"url":"http:\/\/www.jaredhirsch.com\/coolrunnings\/public_images\/75c0e3f5e2\/ghosts-a-plenty.png","inputSize":1209,"outputSize":794,"spriteHeight":75,"spriteWidth":222}
Status: Fixed

Powered by Google Project Hosting