handsontable / handsontable/hyperformula

35 seconds to build graph for non-trivial workbook

Open
#872 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Impact: Medium Performance Verified
Dominant language
TypeScript
Stars
2.8k
Forks
171
Avg merge
1d 22h
Merged PRs (30d)
7

Description

Description

For non-trivial workbook (10+ worksheets, multiple rows and formulas referencing cross worksheets + named expressions) it takes hyperformula about 30-35 seconds to build dependency graph.

Steps to reproduce
  1. Get xlsx workbook (not able to publicly share my sample due to NDA and it is timeconsuming to reproduce it. most value is in math model, not numbers...)
  2. Translate xlsx into dictionary of array of arrays + load all named expressions. Use any library which is able to read xlsx format (XLSX from SheetsJS, ExcelJS, etc)
  3. do buildFromSheets (with default options)
  4. Measure time of buildFromSheets execution.
Demo

Here is profiling result: https://drive.google.com/file/d/1A9hGck4U8BdXs_dJ3_jllLH51qDVDSEr/view?usp=sharing

Your environment

Mac OS X, 2.5 GHz Quad-Core Intel Core i7, 16 GB 1600 MHz DDR3

  • HyperFormula version: ^1.3.0
  • Browser Name and version: server side environment. node --version v14.15.4
  • Operating System: Mac OS X
Links

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the profiling result linked in the issue and trace the buildFromSheets execution path. Reproduce the reported delay with a workbook containing multiple worksheets, cross-sheet formulas, and named expressions, then compare measured build times after investigation; done means the graph build is materially faster for this workload.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.