Performance Guide"
Line 2: | Line 2: | ||
− | = | + | = Refresh UI Update Manually = |
+ | <!--http://tracker.zkoss.org/browse/ZSS-760 --> | ||
+ | When calling Range setter method, zk spreadsheet will automatically check cell dependencies, update the dependent cells and refresh the spreadsheet UI of the range. However, in following cases, developers might not want such "automation" and like to control the evaluation and update by themselves: | ||
+ | |||
+ | * Change a lot of cells in a batch. | ||
+ | If we don't disable auto refresh in such case, the zk spreadsheet will generate a lot of small AU response to a browser which slows down browser rendering speed. | ||
+ | * initialize a book model upon a data source (e.g. a database) before zk spreadsheet renders itself. | ||
+ | Sometimes we need to load a bunch of data from a database to initialize our sheet before it renders in a browser. Disable the auto refresh can eliminate Spreadsheet's unnecessary internal operations for rendering. | ||
== Notify Change == | == Notify Change == | ||
Line 9: | Line 16: | ||
since 3.8.3 | since 3.8.3 | ||
− | If your application doesn't allow users to do any operation that needs a row height calculation e.g. enable / disable wrap text, change a font size, then you can set the attribute <tt>ignoreAutoHeight</tt> to <tt>true</tt>. This will improve client side rendering speed much. | + | If your application doesn't allow users to do any operation that needs a row height calculation e.g. enable / disable wrap text, change a font size, then you can set the attribute <tt>ignoreAutoHeight</tt> to <tt>true</tt>. This will improve client-side rendering speed much. |
<!-- http://tracker.zkoss.org/browse/ZSS-1184 | <!-- http://tracker.zkoss.org/browse/ZSS-1184 |
Revision as of 09:34, 3 February 2016
Refresh UI Update Manually
When calling Range setter method, zk spreadsheet will automatically check cell dependencies, update the dependent cells and refresh the spreadsheet UI of the range. However, in following cases, developers might not want such "automation" and like to control the evaluation and update by themselves:
- Change a lot of cells in a batch.
If we don't disable auto refresh in such case, the zk spreadsheet will generate a lot of small AU response to a browser which slows down browser rendering speed.
- initialize a book model upon a data source (e.g. a database) before zk spreadsheet renders itself.
Sometimes we need to load a bunch of data from a database to initialize our sheet before it renders in a browser. Disable the auto refresh can eliminate Spreadsheet's unnecessary internal operations for rendering.
Notify Change
Ignore Height Calculation
since 3.8.3
If your application doesn't allow users to do any operation that needs a row height calculation e.g. enable / disable wrap text, change a font size, then you can set the attribute ignoreAutoHeight to true. This will improve client-side rendering speed much.
<!-- default is false -->
<spreadsheet ignoreAutoHeight="true"/>
All source code listed in this book is at Github.