Hi Streamlit community,
I recently made an app that displays a lot of images in two columns. Now the performance is not as fast as expected because of two things:
-lack of multithreading
-cache not working fully
The lack of multithreading makes the initial loading of the images quite slow. I tried to solve it with a concurrent.futures.ThreadPoolExecutor but when I call a method with it, it fails to display anything but does display the following error in the terminal:
Thread ‘ThreadPoolExecutor-3_4’: missing ReportContext
For the caching it works only partially because it does not load every image again, but it does rebuild the UI elements such as the sliders etc. which makes the app unresponsive for a long time.
Attached here is a small code example demonstrating what I am trying to do: