Archived:Garbage collecting prohibitively slows S60 2nd Edition (Known Issue)
extkbeditor2
(Talk | contribs) m |
hamishwillee
(Talk | contribs) m (Hamishwillee - Bot change of template (Template:KnowledgeBase) - now using Template:ArticleMetaData) |
||
| Line 2: | Line 2: | ||
__NOTOC__ | __NOTOC__ | ||
__NOEDITSECTION__ | __NOEDITSECTION__ | ||
| − | {{ | + | {{ArticleMetaData |
|id=KIJ000080 | |id=KIJ000080 | ||
|platform=S60 2nd Edition | |platform=S60 2nd Edition | ||
| Line 10: | Line 10: | ||
|creationdate= | |creationdate= | ||
|keywords= | |keywords= | ||
| + | |||
| + | |sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) --> | ||
| + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| + | |sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | ||
| + | |devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) --> | ||
| + | |signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities=<!-- Capabilities required (e.g. Location, NetworkServices.) --> | ||
| + | |author=[[User:Technical writer 1]] | ||
}} | }} | ||
Revision as of 13:59, 24 June 2011
Article Metadata
Tested with
Devices(s): Nokia 6600
Compatibility
Platform(s): S60 2nd Edition
Article
Created: User:Technical writer 1
()
Last edited: hamishwillee
(24 Jun 2011)
Description
Calling the System.gc() method results in extreme slowness and jamming. In Monty 1.0 VM, garbage collection is different and every time System.gc is called, the entire memory is really cleared. This is an extremely slow process!
Solution
Do not call the System.gc method at all, or call the System.gc() garbage collecting method only in non-time-critical situations, such as screen transitions, state transitions, pause states, etc. If the System.gc() method is used, it is recommended to add a short delay (~20-50 ms) after the method call to ensure the sufficient time for the garbage collection, as in the following example:
System.gc();
Thread.sleep(delay); //delay = 20-50 ms

