Spine-Toolbox icon indicating copy to clipboard operation
Spine-Toolbox copied to clipboard

Pack CSV files choice freezes Toolbox

Open jkiviluo opened this issue 1 year ago • 2 comments

Trying to choose 'Pack CSV files' in the arrow causes Toolbox to freeze at least in the FlexTool workflow

image

jkiviluo avatar May 23 '23 06:05 jkiviluo

The connection between the Export_to_CSV and FlexTool3 items creates the datapackage.json files when the "Pack CSV files" option is checked. Since this operation is done in the UI thread, it may freeze the UI if the exporter contains a large number of output files.

The solution is to clean up the exporter's output directory manually.

We could generate the datapackage files in a separate thread/process which would prevent the UI thread from freezing but it is not straightforward to implement. I am unsure if the development effort spent to do it would be worth it, especially since users are not expected to repeatedly check and uncheck the option, they rarely have hundreds of .csv files, and they may be able to just delete the files before clicking the checkbox.

soininen avatar Jan 18 '24 11:01 soininen

Just realized we execute the packaging procedure also every time a project is opened which can drastically affect load times. I think it makes looking into this issue worth the while.

soininen avatar Jan 19 '24 07:01 soininen