Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Large excels - optimize performance of writing file by excelJS + optimize generated file (MS excel opens it much faster)#1018

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
guyonroche merged 3 commits intoexceljs:masterfrompzawadzki82:master
Nov 12, 2019

Conversation

pzawadzki82
Copy link

No description provided.

this._addFill({type:'pattern',pattern:'none'});
this._addFill({type:'pattern',pattern:'gray125'});

this.weakMap=newMap()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice catch! Quick question - any good reason not to use a WeakMap here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

No reason. i'll change it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Changed

}
}

functionmergeDataValidations(model){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Could you add a comment describing how the model is being optimised here?

Copy link
Author

@pzawadzki82pzawadzki82Nov 5, 2019
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

currently excelJS model stores dataValidation per each cell. So if there is many cells data validation is created for every cell. I'll give you example: on my project there 5k rows x 20 columns ~ 100k cells. So in this case MS Excel openes generated file very long (minutes) or if some number is exceeded it reports that ms excel is corrupted.
In many cases validation is the same for bigger range (in our case it is while column but header). So my optimization just replaces multiple dataValidation xml nodes(with the same formula and continous range) with with one where address is defined as range instead one cell. So on my project instead 100k dataValidation nodes there is 20 and this file is opened by MS Excel fast and without errors. This modification does not change excelJS internal model - optimization is made just before save

@guyonrocheguyonroche merged commit2c3acb7 intoexceljs:masterNov 12, 2019
@guyonroche
Copy link
Collaborator

@pzawadzki82 thanks for this PR - I had to modify it a little so that it would handle parsing the files too and I've extended it to include rectangular ranges

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

@guyonrocheguyonrocheAwaiting requested review from guyonroche

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@pzawadzki82@guyonroche@PiotrZawadzki-TomTom

[8]ページ先頭

©2009-2025 Movatter.jp