pytablewriter icon indicating copy to clipboard operation
pytablewriter copied to clipboard

Table generation is slow, even for space aligned

Open makew0rld opened this issue 3 years ago • 1 comments

Hello, thanks for creating this library.

I'm generating a table with around 10,900 lines, and I find that pytablewriter takes ~90 seconds to generate it, ~70 when using 4 cores. By contrast, texttable takes ~7 seconds. This is all on a Raspberry Pi 4.

I am using a SpaceAlignedTableWriter with 8 columns, and simple alignment styling for each column, nothing more.

For texttable, I set max_width=0, set all columns to the text type, and use no borders (set_deco(0)).

I understand issues like this can be annoying to receive, so sorry about that. I thought I'd let you know in case this large time difference is due to some bug.

It's also possible this has to do with parsing and formatting of values or something? I noticed strings like 1,2,3 were being changed to 123 in the output. Let me know if I should file a separate issue for that.

makew0rld avatar Jan 13 '22 19:01 makew0rld

@makeworld-the-better-one Thank you for your feedback.

It's also possible this has to do with parsing and formatting of values or something?

I assume this would be the cause.

If you could upload your scripts that reproduce the issue, I might be optimized the processing.

thombashi avatar Jan 15 '22 06:01 thombashi