×
Namespaces

Variants
Actions
(Difference between revisions)

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

From Nokia Developer Wiki
Jump to: navigation, search
Forum Nokia KB (Talk | contribs)
m (Protected "KIJ000080 - Garbage collecting" [edit=sysop:move=sysop])
extkbeditor2 (Talk | contribs)
m
Line 1: Line 1:
 
 
{{KBKI}}
 
{{KBKI}}
 
__NOTOC__
 
__NOTOC__
 
__NOEDITSECTION__
 
__NOEDITSECTION__
== Garbage collecting KIJ000080 ==
+
{{KnowledgeBase
'''Platform:''' S60 2nd Edition '''Device:''' Nokia 6600
+
|id=KIJ000080  
 
+
|platform=S60 2nd Edition  
'''Description:'''
+
|devices=Nokia 6600
 +
|category=
 +
|subcategory=
 +
|creationdate=
 +
|keywords=
 +
}}
  
 +
==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!
 
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:'''
+
==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 (<nowiki>~</nowiki>20-50 ms) after the method call to ensure the sufficient time for the garbage collection, as in the following example:
 
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 (<nowiki>~</nowiki>20-50 ms) after the method call to ensure the sufficient time for the garbage collection, as in the following example:
  

Revision as of 19:47, 13 October 2008

Template:KBKI


Article Metadata
Tested with
Devices(s): Nokia 6600
Compatibility
Platform(s): S60 2nd Edition
S60 2nd Edition (initial release)
Article
Created: ()
Last edited: extkbeditor2 (13 Oct 2008)

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

67 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×