med-material / ArduinoLogger

Source code for an Arduino Logger (Windows/Mac) used for the advanced human computer interaction (AMMI) course at AAU (Unity 2018.3.2f1)
MIT License
3 stars 2 forks source link

Saving to CSV and saving to DB is slow #42

Closed bastianilso closed 2 years ago

bastianilso commented 3 years ago

Currently our data logging workflow is like this: 1) Data is collected into a dictionary structure and stored in RAM for highest performance during data collection. 2) When "Save data" is pressed, the dictionary structure is looped through and saved as CSV. This is a synchronous process which blocks the UI.

When collecting several minutes of data, saving data takes a very long time. How can we adjust this?

Here are some ideas:

bastianilso commented 3 years ago

The logging code and database saving code both come from the LoggingManager package. So @Vincent-SD if you find issues with logging, please verify that the issue exist in LoggingManager repository too, so all Unity projects can benefit.

https://github.com/med-material/LoggingManager

As a first step, please update the Logging Manager in the ArduinoLogger to use the latest version provided by the repository above.

Vincent-SD commented 2 years ago

Maybe this issue can be closed, what do you think @bastianilso ? See #46