Skip to content

How to optimize the performance of large documents? #677

Description

@OTime-star

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions