-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Is your feature request related to a problem? Please describe.
The data preprocessing currently happening in export-actions.ts is so CPU intensive that the UI gets unresponsive while it is running.
Describe the solution you'd like
The preprocessing step should be moved to the backend and executed there as part of the exportFileListener. To this end, either the raw redux state data required has to be sent to the backend via IPC payload, or the backend has to read the relevant data again from the output file. It should be evaluated which of these approaches is faster, and whether this ends up being significantly slower than the current implementation.
After the preprocessing has been move to the backend, the code for setting the loading state to true and writing the first progress log message should be moved from the menu entries' onClick to the exportFileListener. Similarly, the loading state should then be set to false at the end of the exportFileListener, making the StopLoading IPC channel (which was only introduced as a temporary fix) and all its uses obsolete.
Describe alternatives you've considered
Offloading the preprocessing to the SignalsWorker would also be possible, but using the backend makes more sense here.