PDA

View Full Version : GXT performance question



snorbicet
26 Nov 2008, 6:53 AM
Hello,

I have a question about the performance of GXT.

When I open the "Grid Plugins" demo in the GXT explorer (http://extjs.com/explorer/), opening the new tab takes about 2 seconds to open on a fairly powerful machine (using 100% CPU).
When I switch to the "Overview" tab, it is fast, but when I switch back to the "Grid Plugins" tab again, it takes more than a second.

I understand that creating such complex components takes some time.
My question is: what happens when I simply activate the - already rendered - tab? Why does it take more than a second to simply activate it?

Thanks for your help!
Regards:
Norbi

LINEMAN78
26 Nov 2008, 8:32 AM
Browser? You hosting it locally or using the one on the extjs server?

LINEMAN78
26 Nov 2008, 8:40 AM
I just tested it and see what you are saying. I am using Firefox, but suspect it is the same in IE. This might have something to do with how the grids are being populated/sorted. It looks like they are creating the grids and populating everything onRender(). Seperating this into 2 steps would probably help, such as creating the grids in the constructor and then loading the data onRender(). If you only want it to be slow when you add it to the tab panel, you can change it to onLoad instead of onRender. To speed this up you could just play around with the order things are initiated.

snorbicet
26 Nov 2008, 2:30 PM
Thanks, I will investigate it...

One more question: does this mean that onRender() is called every time the tab is (re)selected? This does not sound logical because in this case the grid would be populated again and again, scrolling and text selection state would be lost, etc. Or do I misunderstand some basic stuff here? :)

snorbicet
28 Nov 2008, 12:12 AM
Anybody any other ideas?
This is a show-stopper for us, because we have relatively slow machines as well...