News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

All Icon in one image.

Started by nvcnvn, December 24, 2011, 09:54:52 PM

Previous topic - Next topic

nvcnvn

Like the way we handle main_block.png, should we add all image like , or into one big image.


Is it good for the loading speed?

Joker™

Quote from: nvcnvn on December 24, 2011, 09:54:52 PM
Like the way we handle main_block.png, should we add all image like , or into one big image.


Is it good for the loading speed?
In terms of loading speed, yes it helps as one needs to load only one image and define the image pixels.

One reason I can think of separate image is that what if we want only one icon at some specific place, in the case again the whole image is going to be loaded. So I'd suggest to leave it as it is, rest is on dev team.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Kindred

we are considering the use of sprites for the next update....

However, Joker's point is actually a very important one...   what happens when you want to use the icon image without CSS definition the sprite location?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

IchBin™

There may be an occasional reason to need a single item some where. But for the most part I think the sprites will make sense in many cases. In particular places like the reply/new post page. The editor loads over 40 images. That's 40 separate HTTP requests. For busy sites this would make a world of difference in bandwidth usage. I think the performance and resources benefits outweigh having separate files.
IchBin™        TinyPortal

Arantor

Also listed as http://www.simplemachines.org/community/index.php?topic=504346.0, closing this one so that we don't have duplicate topics that all say the same basic thing.

Advertisement: