Prevent pause during FOR loops?

Hello everyone.

I am using FOR loops to load CSV datasets from URLs in the draw whenever the end user wants the data loaded. It takes the program about 5 seconds to load/parse/display the data during which time the sketch pauses all activity. I would like to show an animated loading message but cannot due to the pause in the draw.

I cannot preload the CSV files because there are many and they are updated reguraly on another server.

Any ideas?

Thank you very much!

1 Like

Take a look at the thread() function
https://processing.org/reference/thread_.html

3 Likes

Another relevant post: Progress bar from inside draw()

Kf

1 Like

Perfect, thank you! It worked and sped up the process grealty.