univer
univer copied to clipboard
fix: perf improving in set style cache
close https://github.com/dream-num/univer-pro/issues/2529 close https://github.com/dream-num/univer/issues/3475
Now _getCellDocumentModel() is called too frequenctly. _getCellDocumentModel() ---> fontString(font family) ---> set font cache matrix by font family.
Each render frame calc fontString(font family) in _getCellDocumentModel in _setStylesCache. Return condition deps on fontString(font family). That costs a lot of time.
No need to do this. Just using font Matrix.
Pull Request Checklist
- [ ] Related tickets or issues have been linked in the PR description (or missing issue).
- [ ] Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
- [ ] Unit tests have been added for the changes (if applicable).
- [ ] Breaking changes have been documented (or no breaking changes introduced in this PR).