复杂的 Xpage 需要很长时间才能部分刷新 [英] Complex Xpage takes long for partial refreshs

查看:32
本文介绍了复杂的 Xpage 需要很长时间才能部分刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个复杂的 xpage,其中包含许多嵌套的自定义控件.每次我执行部分刷新需要 4 秒以上才能完成.如果我消除了复杂性,它就可以正常工作并且如愿以偿.

I have a complex xpage with lots of nested custom controls. Everytime I execute a partial refresh it takes over 4 seconds to finish. If I remove the complexity it works just fine and is fast as wished.

我对这个复杂的 Xpage 进行了测试,即使在部分执行模式下,这个简单的测试也需要 4 秒以上才能完成.

I put a test on this complex Xpage and even with partial execution mode this simple test takes over 4 seconds to finish.

<xp:button value="Label" id="button1">
    <xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="refreshPanel" disableValidators="true" execMode="partial" execId="inputText1">
    </xp:eventHandler>
</xp:button>
<xp:div id="refreshPanel">
    <xp:inputText id="inputText1"></xp:inputText>
</xp:div>

部分刷新的执行时间

有没有人有这方面的提示?任何可以调整的服务器设置?

Does anyone have a hint on this? Any server settings which can be adjusted?

推荐答案

您可以进行一些小调整以帮助加快速度(一般而言),但我不确定它们对单个复杂页面有何帮助,但是……

There's a few little tweaks you can make to help speed things up (in general) however I'm not sure how they would help with a single complex page, but.....

  • 更改服务器页面持久性设置以将当前页面保留在内存中
  • 尽量减少 SSJS 的使用
  • 部分执行模式(Knut 已经提到过)
  • 支持并发用户加载
  • 保持 Maxheap 大小为可用 RAM 的 1/4
  • 对于您的 XSP 属性,启用使用运行时优化的 Java 脚本和 CSS 资源"
  • 设置您的值绑定,以便它们在页面加载时进行计算.

以上所有内容都是我多年来从其他开发人员那里读到的技巧/建议,我在可能的情况下实施/尝试自己实施,所以可能值得尝试一些/全部以查看是否有帮助?

All of the above are tips/recommendations I've read from other developers over the years and I implement/try to implement myself where possible so might be worth trying some/all to see if it helps?

这篇关于复杂的 Xpage 需要很长时间才能部分刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆