infojulio / and-bible

Automatically exported from code.google.com/p/and-bible
0 stars 0 forks source link

Performance Issue - swordApi.readHtmlText running twice on finger swipe right/left #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Swiping your finger left/right to change chapters

What is the expected output? What do you see instead?

Running through the debugger, I noticed that the 
BibleContentManager.UpdateTextTask function is being called twice.  This is in 
turn calling the slow line:

FormattedDocument formattedDocument = swordApi.readHtmlText(bible, verses, 200);

multiple times.  Figuring out how to call this function only once will speed up 
the performance by a factor of 2x.

What version of the product are you using? On what operating system?

G1 phone modded to Cyanogen's 6.0 mod.  Running Android 2.2

Please provide any additional information below.

Original issue reported on code.google.com by geod...@gmail.com on 7 Sep 2010 at 10:07

GoogleCodeExporter commented 9 years ago
Actually, the swordApi.readHtmlText() function is being called twice on startup 
as well.  I'm sure that the problem which is causing the issue above is also 
causing this one.  Wish I was better at figuring out this Eclipse editor so I 
could help narrow down the cause...

Original comment by geod...@gmail.com on 7 Sep 2010 at 10:51

GoogleCodeExporter commented 9 years ago
I noticed this occurring some time ago but I can't reproduce this problem now.  
Can you give me more detail regarding how to reproduce this?

Original comment by mjden...@gmail.com on 11 Sep 2010 at 6:04

GoogleCodeExporter commented 9 years ago
Funny....now I can't reproduce it either.  My guess is that it is and Eclipse 
problem somehow making either additional connections to the emulator/phone or 
messing up and adding in more threads that are doing the same thing.  I'll see 
if the issue persists other times.

Original comment by geod...@gmail.com on 14 Sep 2010 at 3:10

GoogleCodeExporter commented 9 years ago
Managed to find the problem.  Flipping the phone causes a new activity and 
oncreate to be called, causing a new observer to be registered on every phone 
flip.

http://www.daniweb.com/forums/thread295510.html

Original comment by mjden...@gmail.com on 18 Sep 2010 at 9:51