What are your performance pain points with Streamlit?

Hello Community :wave:

As 2020 comes to a close, we at Streamlit have been thinking about our roadmap for 2021! One of the items we are thinking about is Streamlit’s performance in terms of Speed. We want to hear from you about your pain points:

  • Have you experienced slowness in your app?
  • What were you trying to build in your app?
  • Which actions or functionality were causing slowness?
  • How did you try to fix it? Were any of the workarounds successful?

Please share your thoughts and experiences by commenting below. Thanks :slight_smile:

2 Likes

Hello I have experienced some issues where streamlit keeps running (loading) infinitely. It seems to be linked to when a memory intensive function we have is run for a little while.

I haven’t been able to fix it, right now all we do is stop the streamlit server and restart it.

Please let us customize the look without using CSS styles. Like changing button color or shadows. THANKS!

3 Likes

It’s just too slow.
That’s it.
I love everything else about it.

Shaving seconds or even microseconds off of reloads would be amazing.

@st.cache is wonderful but there’s still a need for more speed.

In summary, my top 3 pain points are:

  • speed
  • speed
  • speed
2 Likes

Hello @joels, I remember I had this problem too when running Streamlit from Cmder in Windows, reloading would take like 5-10 seconds (now I run from Anaconda prompt without Git executable). Didn’t look further but suspected Streamlit would run Git commands now and then and those take seconds on my Cmder. Could you describe a bit more where exactly in your app lifecycle would the app slow down and on what infra are you running it?

Hi, I’m using v 0.72.0 on Windows 10 in Anaconda.

The main speed issue is working with tables. I use pandas a lot. Loading data is fine using @st.cache. It seems like the bottleneck is Streamlit formatting the HTML.

In some cases, like this morning, I’ll switch to st.text() so it displays faster but that also cuts off longer tables and values.

Any recommendations?

First of all thanks for providing this library and all the hard work you put into maintaining and improving it!

I am currently using streamlit for building a tool to analyse datasets (similar to pandas profiling but with a slightly different focus), which leads - among other things - to the creation of a lot of different plots. The overhead of creating the plots is solved using @st.cache but reloading pages after each interaction with the GUI is causing massive rendering overhead. Having to re-render around 10 plots (even if there are no changes) takes multiple seconds, making the app everything but responsive.

If this would be somehow solved (e.g. caching the rendered plot objects between runs) → Magical. Would be open to find a solution myself and submit a PR but everything web dev is for sure not my strong suite.

1 Like

@joels yeah it may be that passing the pandas Dataframe from Python to frontend and vice-versa is a bit long for large datasets. If I recall the Streamlit team is looking at this pain point through using PyArrow to speed up data transfer between front/back for example so you’ve been heard :slight_smile: .

Welcome to the community @Eric_Schmidt ! Thanks a lot for your feedback. Streamlit team is currently working on a way to rerender only one plot instead of 10 given a condition, so stay tuned! On your side, how would you prefer to manipulate the rerendering of specific plots?

Fanilo

I was lurking a while in the shadows :slight_smile:

That sounds very good - looking forward to that!

Not sure what you mean by manipulate. Ideally streamlit would recognize changes (or a lack thereof) and decide whether to re-render, right?

Eric

1 Like

When I run streamlit on Azure it will stay on this page that says: “Please wait…” for a long time sometimes for a few minutes. Appreciate if your team can sort out this issue since Azure is very popular.

Hi @abhi,

I shared my experince in this post.

I hope that there is a solution. Do you have any ideas or solution suggestions?

Best regards,