Closed BinarSkugga closed 1 month ago
Why not just use the Python version of the library, XlsxWriter: https://xlsxwriter.readthedocs.io/index.html
My reports have upward of 100k lines and it can takes 3-5 minutes to generate them using the python library. I am trying to gain some performance so the delay is not as bad. I tried using constant memory and the port for this in python seems abandoned.
My reports have upward of 100k lines and it can takes 3-5 minutes to generate them using the python library.
It shouldn't take that long. Here is a quick test I did with the performance example in the XlsxWriter repo:
python dev/performance/perf_pyx.py 100000
100000, 50, 34.07, 0
It writes 100,000 rows by 50 columns of mixed numbers and strings in around 30 seconds. Try it out on your test machine. If you get similar results but your overall program takes 3 minutes then the bottleneck is elsewhere.
I tried using constant memory and the port for this in python seems abandoned.
It isn't abandoned. I maintain both XlsxWriter
and libxlsxwriter
and the constant_memory
functionality is exactly the same in both.
I'll try that inside of our docker. I believe it's limited in RAM & CPU, that might be the issue, that or some abstraction around the library that we made.
I didn't mean the python library is abandoned, sorry about that. I meant the python port around the library in C is: https://github.com/pyexcel/libxlsxwpy
Apart from this, do you have any idea about the segfault ? I still want an alternative if the issue is something I have no control over.
Apart from this, do you have any idea about the segfault ?
I don't. It is not something that I have encountered or have seen reported.
I still want an alternative if the issue is something I have no control over.
That is reasonable. If it is an option then the Rust version of this library rust_xlsxwriter
has the speed of the C library and (if you use Rust)) the usability of the Python version. It also supports constant memory mode if needed: https://github.com/jmcnamara/rust_xlsxwriter
I will need to close this because I don't believe it is a bug in libxlsxwriter. If you do find the source of the issue let me know.
No worries, thank for your help still :)
Hello,
I am trying to use and run this library using Python. It works great on my computer but when I try to do it inside of a docker container it results in a segfault. I'm using
ctypes
andlibxlsxwriter 1.1.8
. I ran it usinggdb
, here's the full log:Here's my dockerfile for building and running it:
And finally the python code, although it works on my host:
cstring
does actypes.c_char_p
, it fails onworkbook_add_worksheet