Support #417
Sluggish on the Milestone
| Status: | New | Start: | 01/27/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - |
Description
I really like what is possible with the programme, it's simply excellent. The one issue I have is that it is sluggish compared to the normal Home set-up, even before any form of customisation.
I have uninstalled and reinstalled, using Android 2.0, but it is still very sluggish and has the occasional FC.
Any tips for getting round this?
Thanks
History
Updated by Oisin almost 2 years ago
I own a droid, hopefully this helps. Get TasKiller and see how much memory you have and kill all apps except for the widgets you want and sweeter home. I would recommend ignoring these apps. Hope i help!
Updated by sweeterhome almost 2 years ago
There are a few causes of bad performance. They are all related to memory usage. If you can post exactly when (scrolling/panning? using springboards?) the poor performance happens, that will help diagnose it.
The biggest challenge is in dealing with lots of images. This app allows practically unlimited numbers of images, including custom pictures, icons, wallpaper, and caches. Combined with architectural limitations of android, this is by far the biggest challenge in the Sweeter Home app, and is the cause of many forced closes and slow performance.
Sweeter Home has an internal mechanism to manage images it controls. It tries to keep a certain number of images in memory for quick rendering, and when it hits a limit because a new image is needed, it either removes or caches to disk images it thinks it won't need until it gets under the limit. This is different from the image management built in to Android. When Android runs out of image memory because a new image is needed, it crashes. The problem is the Widget infrastructure, of course, uses the builtin Android image handling, which crashes when it runs out of image memory. Note that this is part of the Android infrastructure and not anything that Widget developers can do anything about. For that reason, the Sweeter Home image memory limit is kind somewhat low. This leaves quite a bit of memory to be used by widgets, but it is not really always needed.
Lower values for this limit make it more likely that widgets will succeed in getting memory when they need it. But lower values also slow down Sweeter Home, because fewer images can be kept in memory.
The limit value is calculated based on screen resolution, but you can change it, by going to Menu/More/Preferences/Bitmap Limit. There are some safeguards around what the values can be, but this is still a slightly risky thing to do -- be prepared to uninstall/reinstall if something goes wrong. You can try increasing this number to see if that helps performance, but you might make forced closes more likely. If you find a better default value for droid/milestone, feel free to post it here.
We're looking at possible courses of action to improve the memory situation. Some involve replacing at least small parts of the widget infrastructure. There are some options where we could do that without breaking compatibility with existing widgets. Other areas involve exposing more fine-grained control over images, such as allowing theme makers to customize bit depth and resize-based compression, which sometimes doesn't degrade the appearance of the theme.
Other causes of slow performance are totally out of the control of users.
One factor is extensive logging, which also uses significant memory and CPU cycles. This is done to facilitate bug reporting/fixing and will need to stay in until the rest of the app is stable enough.
Other factors are more easily addressable, such as cases where internal algorithms can be improved, or where short-lived object creation can be avoided to reduce memory load.
Updated by trs almost 2 years ago
I have successfully lowered my bitmap limit to stabilise my widgets with very minimal crash factor.
That in mind I have:
(a) Been INCREDIBLY conservative/budgeted with all other existing items (no frivolous extras; lots of transparency)
(b) Reduced it only by 80,000
(c) Have 80mb~ of free system space
(d) Am running Cyanogen with the first JIT release.
I am still getting bitmap exceeded errors; but it is functional.
Updated by trs almost 2 years ago
oh yeah and I get scrolling problems periodically but opening an app and closing it remedies them; and im on a rogers HTC magic (so I have extra processing power to begin with)
Updated by trs almost 2 years ago
hours later, I've gambled my way up to 500,000 with success. Widgets have become increasingly stable while no perceptual difference can be noticed in sweeter home.
I'm guessing that when it gives me a force close message with the wait option, that's Sweeterhome hanging, while if I get the force close outright, that's the entire android system hanging. I noticed this because ALL of my force closes were widget based interaction,, especially over impulsive mashing.. and when I get the wait option it loads just fine.