How to optimize the performance of large documents?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6.5k
- Forks
- 456
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 5
Description
I'm trying to build a program for Online Excel, but I'm having performance issues.
In my implementation, a workbook is a document. The json format of the document is as follows:
{
"activeSheetId": "aaa",
"sheets": {
"aaa": {
"cells": {
"0": {
"0": {
"value": "123"
}
}
}
},
"bbb": {
"cells": {}
}
}
}
op format is as follows.
//set value
{ type: 'setValue', sheetId: 'aaa', row: 0, col: 0, value: '123' }
//add worksheet
{ type: 'addSheet', sheetId: 'bbb', sheetJson: { cells: {} } }
The performance issue is that the workbook's json is so large, and each time applyOp reads the entire workbook's json from the database.
I expect each worksheet to be a subdocument, and each applyOp reads only the main document (workbook) and the corresponding subdocument (worksheet) based on op.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at applyOp and trace how the workbook JSON is loaded from the database for each operation. Evaluate the proposed workbook-and-worksheet subdocument model for setValue and addSheet operations; done means operations read only the main document and the affected worksheet without loading the full workbook.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend, database, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100