google-code-export / gwt-links

Automatically exported from code.google.com/p/gwt-links
2 stars 0 forks source link

instantiate DiagrammController with a big resolution (more than 400x400) #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce the problem :

1.DiagramController controller = new DiagramController(3000,3000);
2.With no other interaction

If you try to use the controller then the use will be limited as the computer 
is completely slowing down. And make it unusable.

If you use Chrome you can see that there is one processes per tab and so see 
that the tab that make running your server is constantly taking CPU usage and 
memory, enough to slowing down a good computer.

Did you repaint all the time the panel ?

Configs :
gwt-links-1.4.2.jar
GWT 2.4.0
Windows XP pro

Original issue reported on code.google.com by brendan....@gmail.com on 8 May 2012 at 10:44

GoogleCodeExporter commented 9 years ago
Problem found !

For each arrow/link you are drawing your recreate a new canvas of the same size 
as the original. 

For example, if you create a 2000x2000 controller and add 3 labels with two 
links, your webapp will have in memory 3 canvas of the same size (2000x2000).

You should use the original canvas that is created as the DiagramController 
instantiation, and draw link/arrow directly on this one.

Original comment by brendan....@gmail.com on 9 May 2012 at 12:31