Reflow/Layout performance for large application

前端 未结 2 1334
再見小時候
再見小時候 2021-02-11 03:37

I am using GWT to build a HTML application where the performance is correct in general.

Sometimes, it can load many objects in the DOM and the application becomes slow.

2条回答
  •  眼角桃花
    2021-02-11 04:35

    The most basic answer to your question is to use lazy evaluation, also called delayed evaluation. The principle is that you only evaluate a new position when something it depends upon has changed. It generally requires a fair amount of code to set up but is much cleaner to use once that's done. You'd make one assignment to something (such as a window size) and then all the new values propagate automatically, and only the values that need to propagate.

提交回复
热议问题