Skip to content

Add benchmarking #1139

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

Merged
merged 1 commit into from
Mar 5, 2020
Merged

Add benchmarking #1139

merged 1 commit into from
Mar 5, 2020

Conversation

alubbe
Copy link
Member

@alubbe alubbe commented Feb 21, 2020

Summary

I believe it would be highly useful to have a way of running benchmarks, to understand how certain PRs impact performance. This PR adds an xlsx with 150k rows spread of 2 worksheets (data taken from http://eforexcel.com/wp/downloads-18-sample-csv-files-data-sets-for-testing-sales/) as well as a new benchmark task to our package.json.

Here are the numbers of the current master on node v13:

####################################################
WARMUP: Current memory usage: 8.6 MB
WARMUP: huge xlsx file profiling started
Reading worksheet 1
Reading row 50000
Reading row 100000
Reading worksheet 2
Reading row 150000
Processed 2 worksheets and 150002 rows
WARMUP: huge xlsx file profiling finished in 6830ms
WARMUP: Current memory usage (before GC): 63.35 MB
WARMUP: Current memory usage (after GC): 27.55 MB

####################################################
RUN 1: huge xlsx file profiling started
Reading worksheet 1
Reading row 50000
Reading row 100000
Reading worksheet 2
Reading row 150000
Processed 2 worksheets and 150002 rows
RUN 1: huge xlsx file profiling finished in 6681ms
RUN 1: Current memory usage (before GC): 47.6 MB
RUN 1: Current memory usage (after GC): 23.56 MB

####################################################
RUN 2: huge xlsx file profiling started
Reading worksheet 1
Reading row 50000
Reading row 100000
Reading worksheet 2
Reading row 150000
Processed 2 worksheets and 150002 rows
RUN 2: huge xlsx file profiling finished in 6781ms
RUN 2: Current memory usage (before GC): 146.72 MB
RUN 2: Current memory usage (after GC): 51.67 MB

####################################################
RUN 3: huge xlsx file profiling started
Reading worksheet 1
Reading row 50000
Reading row 100000
Reading worksheet 2
Reading row 150000
Processed 2 worksheets and 150002 rows
RUN 3: huge xlsx file profiling finished in 6320ms
RUN 3: Current memory usage (before GC): 174.9 MB
RUN 3: Current memory usage (after GC): 51.65 MB

vs master before the saxes PR was merged:

####################################################
WARMUP: Current memory usage: 8.55 MB
WARMUP: huge xlsx file profiling started
Reading worksheet 1
Reading row 50000
Reading row 100000
Reading worksheet 2
Reading row 150000
Processed 2 worksheets and 150002 rows
WARMUP: huge xlsx file profiling finished in 25585ms
WARMUP: Current memory usage (before GC): 73.81 MB
WARMUP: Current memory usage (after GC): 23.33 MB

####################################################
RUN 1: huge xlsx file profiling started
Reading worksheet 1
Reading row 50000
Reading row 100000
Reading worksheet 2
Reading row 150000
Processed 2 worksheets and 150002 rows
RUN 1: huge xlsx file profiling finished in 25488ms
RUN 1: Current memory usage (before GC): 36.12 MB
RUN 1: Current memory usage (after GC): 20.33 MB

####################################################
RUN 2: huge xlsx file profiling started
Reading worksheet 1
Reading row 50000
Reading row 100000
Reading worksheet 2
Reading row 150000
Processed 2 worksheets and 150002 rows
RUN 2: huge xlsx file profiling finished in 24808ms
RUN 2: Current memory usage (before GC): 43.84 MB
RUN 2: Current memory usage (after GC): 21.4 MB

####################################################
RUN 3: huge xlsx file profiling started
Reading worksheet 1
Reading row 50000
Reading row 100000
Reading worksheet 2
Reading row 150000
Processed 2 worksheets and 150002 rows
RUN 3: huge xlsx file profiling finished in 25397ms
RUN 3: Current memory usage (before GC): 32.42 MB
RUN 3: Current memory usage (after GC): 19.63 MB

In short, we've gotten almost 4 times faster 🎉

@alubbe alubbe merged commit 5ab8f31 into exceljs:master Mar 5, 2020
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

Successfully merging this pull request may close these issues.

2 participants