Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » Article Discussions

Discuss the articles posted on Dev.Opera.

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By andreasbovens O anchor Monday, 20. October 2008, 08:02:21

Optimizing Opera Widget graphics for mobile and devices

In this article Andreas Bovens will explore a few simple techniques that will help you optimize the graphics inside your Opera widgets for mobile phones and other devices with limited resources.

( Read the article )

By AlongTheRoad O anchor Monday, 20. October 2008, 08:29:19

avatarWhat about very large css sprites ? I heard it impact performances due to CPU usage (I'm not talking about possible large size in kb, but in actual width /height).Can you confirm ?

By dstorey O anchor Monday, 20. October 2008, 09:50:56

avatarIt is often recommended to not send large sprites to iPhone as its caching is very bad (only caches under 12kb), but Opera Mobile has no such restrictions. Smaller images are often worse CPU wise if using a repeating pattern as it has to do more work repeating the image many times. I'm not aware of issues with files that are large width/height wise rather than file size.

Andreas: Do you know anything about this?

By andreasbovens O anchor Tuesday, 21. October 2008, 05:40:34

avatarI briefly inquired about this, but it's unclear what the effect of a sprite with a large width/height is on performance. However, it's unlikely you'll need huge sprites for mobile and device optimized widgets (due to the devices' limited resolution) anyways, so I'm not sure this problem really occurs in real world scenarios. Will investigate this a bit further...

By Sharebear anchor Tuesday, 21. October 2008, 07:13:53

avatarNo mention of SVG, shouldn't that, theoretically be the optimal image format for this use (especially your map example)?

By MacDev_ed anchor Tuesday, 21. October 2008, 08:17:32

avatarIndeed svg could be suitable for this example. I just grabbed a map of japan from Wikimedia Commons, and it's ~13kb uncompressed. ~5kb gzipped. It depends on what you need the map for, if you want to highlight different regions then it is easily done with such an svg map, and it would require less memory than for example having the regions highlighted by using png sprites.

Depending on the device performance this may be a good solution, or not. As long as the map path data is simple enough it should be comparable to pngs in time to render. Usual svg optimization techniques still applies of course.

By MacDev_ed anchor Tuesday, 21. October 2008, 09:14:53

avatarHere's the link to the map: http://commons.wikimedia.org/wiki/Image:Blank_map_of_Japan.svg

Moderators: pepelsbey | dstorey | mcx | operadev | chrismills | shwetankdixit | brucelawson | iheni | andreasbovens | zibin | mollydotcom