wei-spring / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

DataBase access on newVM - very high CPU use. #1280

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Notes sent to Shai:

I just took this DBDemo - 
https://code.google.com/p/codenameone/source/browse/trunk/Demos/SQLSample/src/co
m/codename1/db/DBDemo.java

Running on the oldVM CPU use when idle doesn't even register on the activity 
monitor trace highlights.  Running on the newVM the demo uses 100%+ CPU.  If 
you leave it idle on the newVM for a minute or two then it will take a long 
time to respond to touch events.

Adding or deleting rows on both VMs show a spike in CPU and sometimes an 
increase in memory, but the oldVM is sitting under 20% where as the newVM goes 
well over 100%.

I'm seeing the knock on effect of in an app that uses a number of automated 
actions on the database when it starts up is that CPU can spike to > 200% and 
memory can increase beyond what the device can support causing a crash.  The 
DBDemo.java shows the issue but not to the same level as a full app.

Original issue reported on code.google.com by NickKoir...@gmail.com on 13 Jan 2015 at 10:32

GoogleCodeExporter commented 9 years ago
It seems that the mark portion of the GC algorithm dealing with statics got 
into an infinite loop and was unable to escape it. This should be patched in 
newer builds with the next server update.
It might also explain out of memory issues since GC was effectively dead.

Original comment by shai.almog on 14 Jan 2015 at 9:42