如何处理 Ext GWT (GXT) 中小部件渲染缓慢的问题?

发布于 2024-08-20 07:32:59 字数 113 浏览 4 评论 0原文

我有一个窗口,里面有几个小部件。渲染后,它会在左上角显示一秒钟,然后居中。

有没有机会延迟渲染?我的意思是窗口首先居中,然后渲染子窗口小部件。 或者也许我可以在渲染过程中将窗口内容隐藏在蒙版后面?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

游魂 2024-08-27 07:32:59

DeferredCommand 可能可以通过等待所有当前事件得到处理来帮助解决这种情况 - 这样,当需要渲染框时,浏览器的负载可能会减少。

您可以通过使用众多技巧之一(例如 overflow:hidden; text-indent:-9000px;visibility:visible;)首先在客户区域之外显示框来“模拟”延迟渲染然后删除该样式 - 该框应该自动出现在客户区域的中心。

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.

喵星人汪星人 2024-08-27 07:32:59

我曾经处理过在表单中​​动态加载多个 GXT 小部件的情况。

在我的研究结束时,我确定 ExtJS 小部件渲染速度很慢,因此从 GXT 中你没有太多选择。

我最终使用了标准的 GWT 小部件,它的渲染速度要快得多。

您没有提供有关您情况的详细信息,因此我无法说隐藏某些小部件内容的技巧是否适合您的用例。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文