×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Garbage collecting prohibitively slows S60 2nd Edition (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot change of template (Template:KnowledgeBase) - now using Template:ArticleMetaData)
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update)
Line 1: Line 1:
{{KBKI}}
+
{{ArticleMetaData <!-- v1.2 -->
__NOTOC__
+
__NOEDITSECTION__
+
{{ArticleMetaData
+
|id=KIJ000080
+
|platform=S60 2nd Edition
+
|devices=Nokia 6600
+
|category=
+
|subcategory=
+
|creationdate=
+
|keywords=
+
 
+
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|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]]) -->
 
|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]) -->
+
|devices= Nokia 6600
|devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) -->
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
+
|platform= S60 2nd Edition
|capabilities=<!-- Capabilities required (e.g. Location, NetworkServices.) -->
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
|author=[[User:Technical writer 1]]
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
 +
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
 +
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
 +
|keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase -->
 +
|language= <!-- Language category code for non-English topics - e.g. Lang-Chinese -->
 +
|translated-by= <!-- [[User:XXXX]] -->
 +
|translated-from-title= <!-- Title only -->
 +
|translated-from-id= <!-- Id of translated revision -->
 +
|review-by= <!-- After re-review: [[User:username]] -->
 +
|review-timestamp= <!-- After re-review: YYYYMMDD -->
 +
|update-by= <!-- After significant update: [[User:username]]-->
 +
|update-timestamp= <!-- After significant update: YYYYMMDD -->
 +
|creationdate= 20070816
 +
|author= [[User:Technical writer 1]]
 +
<!-- The following are not in current metadata -->
 +
|subcategory=
 +
|id= KIJ000080
 
}}
 
}}
  
Line 29: Line 34:
  
 
&nbsp;Thread.sleep(delay); //delay = 20-50 ms
 
&nbsp;Thread.sleep(delay); //delay = 20-50 ms
[[Category:Known Issue]][[Category:Java ME]][[Category:S60 2nd Edition]]
+
[[Category:Known Issue]][[Category:Java ME]][[Category:S60 2nd Edition (initial release)]]

Revision as of 06:56, 30 March 2012

Article Metadata
Tested with
Devices(s): Nokia 6600
Compatibility
Platform(s): S60 2nd Edition
S60 2nd Edition (initial release)
Article
Created: User:Technical writer 1 (16 Aug 2007)
Last edited: hamishwillee (30 Mar 2012)

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

102 page views in the last 30 days.