Michał Mech
Michał Mech

Reputation: 2055

How to deal with slow widgets rendering in Ext GWT (GXT)?

I have window with few widgets inside. When it is rendered, it shows in top left corner for a second and then is centered.

Is there any chance to lazy rendering? I mean that window is centered first and then child widgets are rendered. Or maybe I can hide window content behind mask during it is rendered?

Upvotes: 3

Views: 1720

Answers (2)

trevorism
trevorism

Reputation: 411

I've dealt with a situation where I was loading several GXT widgets in a form dynamically.

At the end of my research, I determined ExtJS widgets render slowly, so from GXT you don't have many options.

I ended up using standard GWT widgets, which render much more quickly.

You didn't give a lot of detail about your situation so I can't say whether a trick hiding some widget content will work for your use case.

Upvotes: 0

Igor Klimer
Igor Klimer

Reputation: 15321

DeferredCommand might help the situation a bit, by waiting for all the current events to be handled - that way when it's time to render the box, the browser might be less loaded.

You could 'emulate' lazy renedering by showing the box first outside the client area using one of the many tricks for that (like overflow:hidden; text-indent:-9000px; visibility:visible;) and then removing that style - the box should automagically appear at the center of the client area.

Upvotes: 1

Related Questions