Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] tests: Bypass useless
drawGrid
A non negligeable part of the rendering process consists of computations before drawing on the canvas. At runtime, drawgrid takes around 99% of the rendering time with in details: Model.drawgrid : 8.7 ms getGridBoxes: 3.53 ms GetHeaderOffset: 1.09 ms getVisibleRect: 0.37 ms getSheetViewVisibleCols: 0.13ms Which sums to (3.53+1.09+0.37+0.13)/8.7 * .99 = 58.2% of the rendering time. In the tests, we completely mock the canvas to not draw anything. Based on that, we are left with the computations which are not used anyway. Tests `npm run test -- --maxWorkers=2 components` before: 1108 tests > 108 seconds after: 1108 tests > 85.77 seconds ==> 20.5 % improvement closes #2292 Task: 3254822 Signed-off-by: Lucas Lefèvre (lul) <[email protected]>
- Loading branch information