What are your top 3 XPages performance tips for new XPages developers?

后端 未结 6 1180
清歌不尽
清歌不尽 2021-02-06 15:43

What 3 things would you tell developers new to XPages to do to help maximize the performance of their XPages apps?

6条回答
  •  半阙折子戏
    2021-02-06 16:33

    Depends a lot what you mean by performance. For performance of the app:

    1. Use compute on page load wherever feasible. It significantly improves performance.
    2. In larger XPages particularly, combine code into single controls where possible. E.g. Use a single Computed Field control combining literal strings, EL and SSJS rather than one control for each language. On that point, EL performs better than SSJS, and SSJS on the XPage performs better than SSJS in a Script Library.
    3. Use dataContexts for properties that are calculated more than once on an XPage.

    Partial Execution mode is a very strong recommendation, but probably beyond new XPages developers at this point. Java will also perform better than SSJS in a Script Library, but again beyond new developers. XPages controls you've created with the Extensibility Framework should perform better, because they should run fewer lines of Java than multiple controls, but I haven't tested that.

    If you mean performance of the developer:

    1. Get the Extension Library.
    2. Use themes to set default properties, e.g. A standard style for all your pagers.
    3. Use Firebug. If you're developing for Notes Client or IE, still use Firebug. You'll spend longer suffering through Client/IE thank you will fixing the few quirks that will remain.

提交回复
热议问题