android - how to avoid lag/freezes with Samsung RFS filesystem?
The Samsung Galaxy S comes with a propietary filesystem called RFS.
This filesystem seems to underperform in some occasions. Some applications get laggy, and others just freeze when using it. This has reached a point on which an external team has created a tool that basically migrates the whole system to ext4.
But not everyone is technically-savy to apply it, or don't want to r开发者_JS百科isk voiding their smartphone's warranty.
I realize that the ideal situation would be that the filesystem was transparent and performant in all cases. But since this doesn't seem to be the case, I'd like to know:
- Does anyone know how to work around RFS' rough edges?
- Is there any guide or a best-practices document that the devs should read?
Thanks a lot!
Don't do I/O on the UI thread. It's that simple.
That means don't load preferences, don't query a database, don't decode bitmaps, etc etc... use background threads for all those things. Use StrictMode to keep your code on the straight and narrow.
FWIW I am a Galaxy S owner and have long been appalled at how Samsung crippled its performance with one stupid choice. I run "Darky's ROM" on it now and that basically fixes everything permanently... can't recommend that ROM highly enough.
The only way around RFS is to change it to ext4. Look at the Nexus S (a Galaxy S device), Google changed the RFS to ext4.
RFS is R eally F ricken S low and Samsung needs to realize it and change these devices.
When I was running my Galaxy S with the RFS file system, I only "noticed" the lag sometimes (so i thought), mainly when twitter would sync the latest content. The device would completely lock up and I couldn't do anything. Now that I am running a kernel with voodoo, I realized how slow RFS is. I came from a G1, so the Galaxy S was lightening fast. When I went from RFS to EXT4, the change was like coming from my G1 to the Galaxy S again.
I have a few friends that also have the Galaxy S, and I recommended it to them. Even they complain about the lag of the device.
There is no work around for RFS. Every developer should contact Samsung and let them know just how bad RFS is.
As Reuben said, don't do I/O on the UI thread, but that's a good practice anyhow. But that still wont fix the short comings of RFS. If you do a lot of I/O, no matter what thread it's on, it is still going to lag the device.
精彩评论