gslender / ofcgwt

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

Issue with Timer scheduleRepeating() #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In the demo application i changed the updater.schedule(300) to
updater.scheduleRepeating(1000)to get live data simulation but memory of
the IE/Firefox was increasing drastically and it keeps on increasing and
then the browser gets hanged after sometime.
2.
3.

What is the expected output? What do you see instead?
Memory should increase like this.

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

Please provide any additional information below.

Original issue reported on code.google.com by mail2max...@gmail.com on 30 Sep 2008 at 3:10

GoogleCodeExporter commented 9 years ago
There are known memory leaks within the OFC flash component - Adobe Flex is 
apparently known for poor memory managment and/or garbage collection.
http://openflashchart.com/forum/viewtopic.php?f=4&t=75

I am looking into the OFC flash widget problem, but considering this is not my 
work 
nor project, I'm not 100% sure if this problem can be quickly fixed.

As such, an alternative option I'm thinking about is to unload/remove the flash 
object and reload/insert again after '#n' updates - this would mean that after 
a 
configurable amount of updates the flash object would be dropped and 
re-inserted. 
This might hide the problem and reduce the memory consumption. 

Thoughts?

Original comment by gslen...@gmail.com on 1 Oct 2008 at 1:16

GoogleCodeExporter commented 9 years ago
that should fix the problem to some extent...
can you please tell how can i do it thru code...

Original comment by mail2max...@gmail.com on 1 Oct 2008 at 2:48

GoogleCodeExporter commented 9 years ago
I've not looked into the details, but something that calls onUnload and onLoad 
would 
probably do the trick.. which essentially removes and injects the swf on the 
dom.

Original comment by gslen...@gmail.com on 1 Oct 2008 at 3:58

GoogleCodeExporter commented 9 years ago
i tried something like that and it refreshed the swf object also, but the 
refresh is
not smooth. the screen blinks. is there any way to make this transition smooth.

Original comment by mail2max...@gmail.com on 1 Oct 2008 at 4:06

GoogleCodeExporter commented 9 years ago
No, which is why I would only do it after '#n' updates to avoid the frequent 
flashing 
- the memory leak is small so you could do it after 60 updates etc... which 
would not 
happen often with a 1 second update time (ie every minute).

Not a perfect solution, but one that works until the OFC flash code is fixed.

Original comment by gslen...@gmail.com on 1 Oct 2008 at 4:31

GoogleCodeExporter commented 9 years ago
I've posted an updated SWF flash object that should be a little better with 
memory 
leaks - I've found some bugs in the flash code that wasn't releasing frames on 
reload. I also changed events to weak references to ensure GC happens.

Please try the SVN version if you can.

Original comment by gslen...@gmail.com on 5 Oct 2008 at 9:57

GoogleCodeExporter commented 9 years ago
close as this fixed is now rolled into release 1.0

Original comment by gslen...@gmail.com on 12 Oct 2008 at 5:10

GoogleCodeExporter commented 9 years ago

Original comment by gslen...@gmail.com on 9 Jan 2009 at 5:08