mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #426] File creation performance #334
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#334
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @duncangroenewald on GitHub (Dec 23, 2023).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/426
Originally assigned to: @jmcnamara on GitHub.
Is there any way to improve the performance when creating a file. I am generating a 4.5mb XLS file and the creation process seems to be quite slow - around about a minute - given the size I would expect that could be done much faster than that.
I haven't done much investigation on what exactly could be the cause but it seems to be creation of the cells themselves that is slowing things down.
I figured I would ask just in case there might be some quick way to improve performance.
Thanks
@jmcnamara commented on GitHub (Dec 23, 2023):
It shouldn't take anything like a minute to create a 4.5MB file.
Here is a sample program I ran as a test:
I put this in the examples directory of a repo clone and compiled it as follows:
This runs in around 2.5sec:
And the output file is ~ 4.5MB:
This was on a 3.2 GHz 6-Core Intel Core i7 Mac mini with macOS 14.2.1 (Sonoma).
I'd suggest starting with the same example, verifying the performance, and if it is more or less the same then try to figure out what extra work your program is doing.
@duncangroenewald commented on GitHub (Dec 23, 2023):
Thanks for that. I just looked into it a little more and I have to convert values from strings and the checks to determine the value type seem to be slowing things down. Nothing to do with this library.