Render and Cache"
|Line 43:||Line 43:|
Revision as of 08:14, 5 April 2012
ZK Spreadsheet provide various setting
Use client cache will improve performance when user switch between sheet.
ZK Spreadsheet enable cache by default. To disable cache, use Spreadsheet.setClientCacheDisabled
Max Rendered Cell Size
ZK Spreadsheet load cell data and also prune invisible cells as well when user scrolling sheet. The default setting is 8000, means client side will prune cells only when total cell number is more then 8000.
Ideality, if browser could support, no prune cell would provide fest response effect, since all loaded cell no need to re-create. However, browser has limitation, if loaded cell number is outnumber then browser could handle, browser may become slow and unstable.
Set proper size by Spreadsheet.setMaxRenderedCellSize
ZK Spreadsheet load cell data base on preloadRowSize/preloadColSize attribute when load sheet and scrolling.
In theory, increase preload size will improve response time. Since cell data may preloaded, no need to send request to server, it will also decrease the number of client/server communcation. However, if preload size is outnumber then needed, client side may need extra time to process extra data. For example, a screen display 50 rows * 30 columns, but preload size is 500 rows * 300 columns, then client side need extra time to process invisible data.
<zk> <window vflex="1" width="100%"> <spreadsheet clientCacheDisabled="false" maxRenderedCellSize="15000" preloadColumnSize="60" preloadRowSize="80" id="spreadsheet" vflex="true" width="100%" showSheetbar="true" src="/WEB-INF/excel/config/ZSS-demo_sample.xlsx" maxcolumns="100" maxrows="1000" ></spreadsheet> </window> </zk>
View complete source of ZUML renderAndCache.zul.zul
|2.3.0||April, 2012||Client cache/Max Rendered Cell Size|
All source code listed in this book is at Github.