Skip to content
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

Fix issue causing memory to explode on assets page #19796

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

salazarm
Copy link
Contributor

Summary & Motivation

This array is used as a dependency to setup a bunch of listeners. Because we're using .map we end up creating a new array on every render which causes us to unregister and register a new set of listeners endlessly. If your computer can keep up with the memory swapping then everything seems fine but if it can't your tab quickly grows unbounded.

How I Tested These Changes

Use the task manager and saw that the "Assets tab" is no longer using 50%+ CPU and that the memory usage isn't changing wildly.

Screenshot 2024-02-14 at 1 49 45 PM

Copy link

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-m8mjkfrz2-elementl.vercel.app
https://salazarm-fix-array-changing.core-storybook.dagster-docs.io

Built with commit b0022ad.
This pull request is being automatically deployed with vercel-action

@salazarm salazarm linked an issue Feb 14, 2024 that may be closed by this pull request
@salazarm salazarm merged commit b2c9271 into master Feb 14, 2024
1 of 2 checks passed
@salazarm salazarm deleted the salazarm/fix-array-changing branch February 14, 2024 18:54
jmsanders pushed a commit that referenced this pull request Feb 14, 2024
## Summary & Motivation

This array is used as a dependency to setup a bunch of listeners.
Because we're using `.map` we end up creating a new array on every
render which causes us to unregister and register a new set of listeners
endlessly. If your computer can keep up with the memory swapping then
everything seems fine but if it can't your tab quickly grows unbounded.

## How I Tested These Changes

Use the task manager and saw that the "Assets tab" is no longer using
50%+ CPU and that the memory usage isn't changing wildly.

<img width="792" alt="Screenshot 2024-02-14 at 1 49 45 PM"
src="https://github.com/dagster-io/dagster/assets/2286579/ef39d3a7-3768-408b-bccc-fa28d2b307ff">

(cherry picked from commit b2c9271)
PedramNavid pushed a commit that referenced this pull request Mar 28, 2024
## Summary & Motivation

This array is used as a dependency to setup a bunch of listeners.
Because we're using `.map` we end up creating a new array on every
render which causes us to unregister and register a new set of listeners
endlessly. If your computer can keep up with the memory swapping then
everything seems fine but if it can't your tab quickly grows unbounded.



## How I Tested These Changes

Use the task manager and saw that the "Assets tab" is no longer using
50%+ CPU and that the memory usage isn't changing wildly.

<img width="792" alt="Screenshot 2024-02-14 at 1 49 45 PM"
src="https://github.com/dagster-io/dagster/assets/2286579/ef39d3a7-3768-408b-bccc-fa28d2b307ff">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assets web page memory leak
2 participants