Skip to content

Conversation

@nhz2
Copy link
Contributor

@nhz2 nhz2 commented Sep 2, 2024

Here is a simple benchmark:

This PR: 2.317752 seconds (9.40 M allocations: 623.127 MiB, 23.31% gc time)
master: 11.811335 seconds (52.20 M allocations: 23.567 GiB, 24.20% gc time)

using XLSX

function create_excel_file(N)
    # Create an in-memory buffer for the Excel file
    io = IOBuffer()
    XLSX.openxlsx(io, mode="w") do xf
        sheet = xf[1]
        XLSX.writetable!(sheet, [randn(N), rand(1:100, N)], ["column_1", "column_2"])
    end
    return take!(io)
end

@time create_excel_file(200000);
@time create_excel_file(200000);

ZipArchives.jl requires Julia 1.6, so I increased the Julia compact.

@nhz2 nhz2 marked this pull request as ready for review September 2, 2024 04:59
@TimG1964
Copy link
Contributor

TimG1964 commented Sep 2, 2024

This is great! It will make a big difference for me! Thank you!

@felipenoris
Copy link
Owner

This is super awesome!

@codecov
Copy link

codecov bot commented Sep 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.01%. Comparing base (6c6dc71) to head (9f1ac0e).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #266      +/-   ##
==========================================
+ Coverage   94.76%   95.01%   +0.24%     
==========================================
  Files          15       15              
  Lines        2007     2005       -2     
==========================================
+ Hits         1902     1905       +3     
+ Misses        105      100       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@felipenoris felipenoris merged commit 9fcdedc into felipenoris:master Sep 8, 2024
@nhz2 nhz2 deleted the Faster-writing branch September 10, 2024 18:37
nhz2 added a commit to nhz2/XLSX.jl that referenced this pull request Sep 14, 2024
I forgot to update the docs in felipenoris#266 when the required Julia version changed to v1.6
felipenoris pushed a commit that referenced this pull request Sep 14, 2024
I forgot to update the docs in #266 when the required Julia version changed to v1.6
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.

3 participants