-
Notifications
You must be signed in to change notification settings - Fork 99
Don't create markRefs unless renderMarks is provided #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We have an application that uses react-range under the hood, and we noticed that a range input was taking 2GB of RAM on our machines. I did some investigation and found that regardless of whether the marks functionality was being used, refs were being created for each possible value of the range. We have some fairly huge ranges (we're using the input to scrub a video with potential microsecond accuracy), and can imagine that other people are affected by the previous behavior. This change should allow us to continue using large input ranges without incurring a memory penalty.
wolfd
added a commit
to wolfd/streamlit
that referenced
this pull request
May 30, 2023
As mentioned in https://blog.streamlit.io/six-tips-for-improving-your-streamlit-app-performance/ memory usage struggles in the browser if you have large ranges: > Due to implementation details, high-cardinality sliders don't suffer > from the serialization and network transfer delays mentioned earlier, > but they will still lead to a poor user experience (who needs to > specify house prices up to the dollar?) and high memory usage. In my > testing, the example above increased RAM usage by gigabytes until the > web browser eventually gave up (though this is something that should > be solvable on our end. We'll look into it!) This was caused by a bug in react-range, which I fixed last year. tajo/react-range#178 At the time, I had figured it would get picked up by a random yarn upgrade and didn't worry too much about it. But, apparently yarn doesn't really have an easy way of doing upgrades of transitive dependencies (see yarnpkg/yarn#4986)? I took the suggestion of someone in that thread to delete the entry and let yarn regenerate it. Some techinical details about the react-range fix from the original commit message (the "application" is a streamlit app): > We have an application that uses react-range under the hood, and we > noticed that a range input was taking 2GB of RAM on our machines. I > did some investigation and found that regardless of whether the marks > functionality was being used, refs were being created for each > possible value of the range. > We have some fairly huge ranges (we're using the input to scrub a > video with potential microsecond accuracy), and can imagine that > other people are affected by the previous behavior. This change > should allow us to continue using large input ranges without > incurring a memory penalty.
wolfd
added a commit
to wolfd/streamlit
that referenced
this pull request
May 30, 2023
As mentioned in https://blog.streamlit.io/six-tips-for-improving-your-streamlit-app-performance/ memory usage struggles in the browser if you have large ranges: > Due to implementation details, high-cardinality sliders don't suffer > from the serialization and network transfer delays mentioned earlier, > but they will still lead to a poor user experience (who needs to > specify house prices up to the dollar?) and high memory usage. In my > testing, the example above increased RAM usage by gigabytes until the > web browser eventually gave up (though this is something that should > be solvable on our end. We'll look into it!) This was caused by a bug in react-range, which I fixed last year. tajo/react-range#178 At the time, I had figured it would get picked up by a random yarn upgrade and didn't worry too much about it. But, apparently yarn doesn't really have an easy way of doing upgrades of transitive dependencies (see yarnpkg/yarn#4986)? I took the suggestion of someone in that thread to delete the entry and let yarn regenerate it. Some technical details about the react-range fix from the original commit message (the "application" is a streamlit app): > We have an application that uses react-range under the hood, and we > noticed that a range input was taking 2GB of RAM on our machines. I > did some investigation and found that regardless of whether the marks > functionality was being used, refs were being created for each > possible value of the range. > We have some fairly huge ranges (we're using the input to scrub a > video with potential microsecond accuracy), and can imagine that > other people are affected by the previous behavior. This change > should allow us to continue using large input ranges without > incurring a memory penalty.
9 tasks
vdonato
pushed a commit
to streamlit/streamlit
that referenced
this pull request
May 31, 2023
As mentioned in https://blog.streamlit.io/six-tips-for-improving-your-streamlit-app-performance/ memory usage struggles in the browser if you have large ranges: > Due to implementation details, high-cardinality sliders don't suffer > from the serialization and network transfer delays mentioned earlier, > but they will still lead to a poor user experience (who needs to > specify house prices up to the dollar?) and high memory usage. In my > testing, the example above increased RAM usage by gigabytes until the > web browser eventually gave up (though this is something that should > be solvable on our end. We'll look into it!) This was caused by a bug in react-range, which I fixed last year. tajo/react-range#178 At the time, I had figured it would get picked up by a random yarn upgrade and didn't worry too much about it. But, apparently yarn doesn't really have an easy way of doing upgrades of transitive dependencies (see yarnpkg/yarn#4986)? I took the suggestion of someone in that thread to delete the entry and let yarn regenerate it. Some technical details about the react-range fix from the original commit message (the "application" is a streamlit app): > We have an application that uses react-range under the hood, and we > noticed that a range input was taking 2GB of RAM on our machines. I > did some investigation and found that regardless of whether the marks > functionality was being used, refs were being created for each > possible value of the range. > We have some fairly huge ranges (we're using the input to scrub a > video with potential microsecond accuracy), and can imagine that > other people are affected by the previous behavior. This change > should allow us to continue using large input ranges without > incurring a memory penalty.
eric-skydio
pushed a commit
to eric-skydio/streamlit
that referenced
this pull request
Dec 20, 2023
As mentioned in https://blog.streamlit.io/six-tips-for-improving-your-streamlit-app-performance/ memory usage struggles in the browser if you have large ranges: > Due to implementation details, high-cardinality sliders don't suffer > from the serialization and network transfer delays mentioned earlier, > but they will still lead to a poor user experience (who needs to > specify house prices up to the dollar?) and high memory usage. In my > testing, the example above increased RAM usage by gigabytes until the > web browser eventually gave up (though this is something that should > be solvable on our end. We'll look into it!) This was caused by a bug in react-range, which I fixed last year. tajo/react-range#178 At the time, I had figured it would get picked up by a random yarn upgrade and didn't worry too much about it. But, apparently yarn doesn't really have an easy way of doing upgrades of transitive dependencies (see yarnpkg/yarn#4986)? I took the suggestion of someone in that thread to delete the entry and let yarn regenerate it. Some technical details about the react-range fix from the original commit message (the "application" is a streamlit app): > We have an application that uses react-range under the hood, and we > noticed that a range input was taking 2GB of RAM on our machines. I > did some investigation and found that regardless of whether the marks > functionality was being used, refs were being created for each > possible value of the range. > We have some fairly huge ranges (we're using the input to scrub a > video with potential microsecond accuracy), and can imagine that > other people are affected by the previous behavior. This change > should allow us to continue using large input ranges without > incurring a memory penalty.
zyxue
pushed a commit
to zyxue/streamlit
that referenced
this pull request
Mar 22, 2024
As mentioned in https://blog.streamlit.io/six-tips-for-improving-your-streamlit-app-performance/ memory usage struggles in the browser if you have large ranges: > Due to implementation details, high-cardinality sliders don't suffer > from the serialization and network transfer delays mentioned earlier, > but they will still lead to a poor user experience (who needs to > specify house prices up to the dollar?) and high memory usage. In my > testing, the example above increased RAM usage by gigabytes until the > web browser eventually gave up (though this is something that should > be solvable on our end. We'll look into it!) This was caused by a bug in react-range, which I fixed last year. tajo/react-range#178 At the time, I had figured it would get picked up by a random yarn upgrade and didn't worry too much about it. But, apparently yarn doesn't really have an easy way of doing upgrades of transitive dependencies (see yarnpkg/yarn#4986)? I took the suggestion of someone in that thread to delete the entry and let yarn regenerate it. Some technical details about the react-range fix from the original commit message (the "application" is a streamlit app): > We have an application that uses react-range under the hood, and we > noticed that a range input was taking 2GB of RAM on our machines. I > did some investigation and found that regardless of whether the marks > functionality was being used, refs were being created for each > possible value of the range. > We have some fairly huge ranges (we're using the input to scrub a > video with potential microsecond accuracy), and can imagine that > other people are affected by the previous behavior. This change > should allow us to continue using large input ranges without > incurring a memory penalty.
zyxue
pushed a commit
to zyxue/streamlit
that referenced
this pull request
Apr 16, 2024
As mentioned in https://blog.streamlit.io/six-tips-for-improving-your-streamlit-app-performance/ memory usage struggles in the browser if you have large ranges: > Due to implementation details, high-cardinality sliders don't suffer > from the serialization and network transfer delays mentioned earlier, > but they will still lead to a poor user experience (who needs to > specify house prices up to the dollar?) and high memory usage. In my > testing, the example above increased RAM usage by gigabytes until the > web browser eventually gave up (though this is something that should > be solvable on our end. We'll look into it!) This was caused by a bug in react-range, which I fixed last year. tajo/react-range#178 At the time, I had figured it would get picked up by a random yarn upgrade and didn't worry too much about it. But, apparently yarn doesn't really have an easy way of doing upgrades of transitive dependencies (see yarnpkg/yarn#4986)? I took the suggestion of someone in that thread to delete the entry and let yarn regenerate it. Some technical details about the react-range fix from the original commit message (the "application" is a streamlit app): > We have an application that uses react-range under the hood, and we > noticed that a range input was taking 2GB of RAM on our machines. I > did some investigation and found that regardless of whether the marks > functionality was being used, refs were being created for each > possible value of the range. > We have some fairly huge ranges (we're using the input to scrub a > video with potential microsecond accuracy), and can imagine that > other people are affected by the previous behavior. This change > should allow us to continue using large input ranges without > incurring a memory penalty.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have an application that uses
react-range
under the hood, and we noticed that a range input was taking 2GB of RAM on our machines. I did some investigation and found that regardless of whether the marks functionality was being used, refs were being created for each possible value of the range.We have some fairly huge ranges (we're using the input to scrub a video with potential microsecond accuracy), and can imagine that other people are affected by the existing behavior. This change should allow us to continue using large input ranges (without marks) without incurring a memory penalty.
Fixes #170