Skip to main content

Hi Team, 

I am trying to develop a Streamlit app. When I am chaning the filter condition it is taking longer than expected time to apply those filters and fetch me the data I want. 

Hello @Rajendra Pasupuleti , in my  experience, filters apply quickly but the various preprocessing steps before the filter can take time. Try to put everything that will always return the same value in functions and decorate the function with st.cache_data. 


When the data volume is in thousands it is working fine but when the data grows into more than 200K+ it’s taking very long. I do have st.cache_data on my code. 


Hello @Rajendra Pasupuleti , in my  experience, filters apply quickly but the various preprocessing steps before the filter can take time. Try to put everything that will always return the same value in functions and decorate the function with st.cache_data. 

Yes this method solves the issue with Data Retrieval and Filtering. In case if it doesn't it may be worthwhile to validate the Filtering logic( for example switching for Loop with a lambda function)


Reply