-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to optimize the performance of large documents? #677
Comments
In general, the smaller you can make the documents the better. Even Excel is notoriously bad at processing large datasets. For this particular application, I'd recommend:
|
Thank you for your help. treating each worksheet as a separate document seems like a good idea. Here are some of my attempts and the issues I've encountered: "workbook": {
"activeSheetId": "aaa",
"sheets": [
"aaa",
"bbb"
]
}
"aaa": {
"cells": {
"0": {
"0": {
"value": "123"
}
}
}
},
"bbb": {
"cells": {}
} Using the above data as an example, I would create three documents ['aaa', 'bbb', 'workbook']. There are some issues:
// add sheet (before)
{ type: 'addSheet', sheetId: 'bbb', sheetJson: { cells: {} } }
// add sheet (now)
{ create: { sheetJson: { cells: {} } } }, // for sheet doc
{ op: { type: 'addSheet', sheetId: 'bbb' } }, // for workbook doc
|
Maybe you can compose op to ops by transaction. eg: ops: [op1, ...opn] |
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:
op format is as follows.
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.
The text was updated successfully, but these errors were encountered: