-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
None
-
Security Level: Jimmy
Steps to reproduce: case1
- import https://docs.google.com/spreadsheets/d/1qkbOKoOoFVA22YQxB-8RgjopDPkyGOl2/edit?usp=share_link&ouid=114351817352708928223&rtpof=true&sd=true
- click clear button
Current Result
it takes around 1.8s
Expected result
less time
Steps to reproduce: case2
- click fill button
Debug Info
- I found multiple cells have the same dependents, but when clearing each cell, keikai has to re-search the cell's dependent again, cannot reuse the previous dependent search results.
Workaround
use an execution scope cache
DependencyTableEx.java
use an execution scope cache Map<precedent, Set<dependent>>.
- During one execution, multiple cells might collect the same dependents, the cache can save time to locate the same dependents in one execution among multiple cells.
- But to avoid DependencyTable from depending on Execution directly, it's better to inject the cache from outside.
- it clears the cache when there is any change
inject the cache
set an execution scope cache Map from the caller
see https://github.com/zkoss/keikaicml/compare/master...keikai-679
- relates to
-
KEIKAI-721 improve the performance of pasting hundreds of cells
- Closed