PDA

View Full Version : Window with tabs too slow to open



wemerson.januario
12 Jul 2010, 8:14 PM
Hello!
I having a problem to render window with 3 or more simple tabs as item. When I click to show the window it takes about 5 to 6 seconds to show the window. I am running in localhost. How can I reduce this time because is too slow for just onde window with 3 simple tabs.
Here my xds.
Thanks

jarrednicholls
13 Jul 2010, 6:35 AM
Hi Wemerson,

Ext JS layout rendering is processor intensive, I won't lie. We're constantly working to improve rendering speeds in the Ext JS component model. You will continue to see improvement in render times in future Ext JS versions, as it is always a priority and concern to keep that time as low as possible and pushing the envelope to always try to improve upon what we have.

I think the biggest render-intensive item that you have in your window is the HTML Editor. That component requires a lot of browser processing power to render because it has to create an editable document & frame. It's a complex component to say the least.

To possibly speed up the display of that window, you can set the window to render preemptively as soon as possible, and simply keep it "hidden". When you go to "show" the window, it will already be rendered and laid out and thus will show up much quicker.

wemerson.januario
13 Jul 2010, 6:28 PM
Thanks Jarred.
So How can I render the window preemptively and simply keep it "hidden" ?

jarrednicholls
14 Jul 2010, 6:30 AM
var myWindow = new Ext.Window({
renderTo: Ext.getBody()
});


which will render the Window immediately, and it is (by default) hidden. Then later you can explicitly call



myWindow.show();


While the component is hidden, it cannot be laid out properly, so it can still take a bit of processing to do a layout operation, but all of the DOM elements will be rendered ahead of time. So instead of creating the Window instance and showing it right when you want it to show, you can create the instance much earlier on, and then simply show it when you want. That's all there is to it :-)

wemerson.januario
14 Jul 2010, 6:38 AM
Thanks Jarred!