blackberry / WebWorks

BlackBerry WebWorks for Smartphones is a platform for building deeply integrated web applications for BlackBerry smartphones
http://developer.blackberry.com/html5
268 stars 51 forks source link

Hourglass Improvements #78

Closed tneil closed 12 years ago

tneil commented 12 years ago

Background

In the v2.2 release of WebWorks we implemented a "Memory Maid" which is a background running thread that looks to see if total memory usage has increased by 5% and if so we would call a System.gc()

The reason behind this is that there are two main culprits left that cause a memory leak on BB6/BB7 that is in the operating system mechanism that provides an IPC channel between WebKit and Java.

The Memory Maid was a stop gap measure to ensure that memory was being cleaned up on the Native side of things. Essentially memory was orphaned when the URL of the WebView changed or when the application exited

There are two main items left that require updates so that we work around the memory issues on BB6/BB7

The focus of this feature is to adjust the Memory Maid so that it is less intrusive to a user using the application. The changes to the Memory Maid are as follows

This provides a much better user experience considering the delays of GC only happen during the exit of your application and not during the application usage

tneil commented 12 years ago

The branch containing these changes can be found here:

https://github.com/blackberry-webworks/WebWorks/tree/next-memory-maid

kwallis commented 12 years ago

Pulled in...