开发者

Performance issues with images in Blackberry app

I am developing one Blackberry application. In that application i am using lot of images both downloading from server as well as inside application using images for designing image button. My applic开发者_开发知识库ation working fine until continuously using 3 to 4 minutes.After that my application performance was too bad. My question is how to optimize memory to improve my application performance?

Thanks in Advance.


A pure guess - you are keeping the downloaded images in RAM, even if you don't use them on your current screen. If this is the case, then try to save them to the file system and read only those you're actually use for the current screen.

Unfortunatelly we can only guess, while it'd be much better to do it in a professional way. First of all you should detect your real reason. For this you should monitor your app to see what kind of objects eat most of the memory. And also how memory state changes in time. I work in JDE and it has a built-in tool for such kind of monitoring: 'View' > 'Object Statistics' (or 'Memory Statistics'). To activate those items you have to start your app in debugger. When you know the reason, you can go further and actually fix your code.


Use Eclipse Blackberry plugin profiler to find out if its memory or cpu performance issues.

If there are images in resources you are using constantly for UI elements, it's better to load them on app start and save them into some static constants. This way you will save CPU from loading images from resources.

Also consider convert images in resources into PNG with the 565 colorspace

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜