Skip to content
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

Just seems to lock up after approx 6k rows. #17

Open
nick227 opened this issue Apr 18, 2014 · 3 comments
Open

Just seems to lock up after approx 6k rows. #17

nick227 opened this issue Apr 18, 2014 · 3 comments

Comments

@nick227
Copy link

nick227 commented Apr 18, 2014

No description provided.

@elwerene
Copy link

you should check out my fork, I optimized this a lot!

@ctavan
Copy link

ctavan commented Nov 18, 2014

@functionscope @elwerene Are there any plans to backport the enhancements from excel-export-fast into this project?

@emavok
Copy link

emavok commented Apr 7, 2016

The largest performance improvement (which is getting the /Large example to work) is to the shareStrings from an Array to a Map (=object).

The function addStringCol does a lookup in shareStrings to see, whether the value is already registered as a shared string. In the example this lookup always fails (because it writes GUIDs) and hence is always looping over the entire array. A map lookup (shareStrings[value] === undefined) changes this lookup from an order n orperation to an log(n) operation. Since addStringCol is called for each string, the total execution time performs like O(n^2). With the map, it reduces to O(n log(n)).

Obviously, you have to count your sharedStrings manually. But the change is minimal, the result is huge. See attached file for the changes (marked by CHANGE START ... CHANGE END).
index.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants