Comments (16)
Thanks for reporting this and recording a demo, I will try to triage this early next week, hopefully shipping a fix soon.
If someone is already triaging this, feel free to open a PR and mentioning this issue.
from react.
This was in incognito mode without any other extensions enabled
Just wondering, how'd you install React DevTools in incognito?
from react.
Also cannot reproduce anymore 😬 (same chrome version as @hoxyq ).
I'm slightly concerned that this might reappear unless we can pinpoint the Chromium commit that might have changed the behavior here...
from react.
This was in incognito mode without any other extensions enabled
Just wondering, how'd you install React DevTools in incognito?
There's an Allow in Incognito
switch in the Details
of any Chrome extension.
![image](https://private-user-images.githubusercontent.com/5288805/304624670-a3ec6946-b5eb-4729-ae07-3275b5d40738.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2MDU4NzIsIm5iZiI6MTcxOTYwNTU3MiwicGF0aCI6Ii81Mjg4ODA1LzMwNDYyNDY3MC1hM2VjNjk0Ni1iNWViLTQ3MjktYWUwNy0zMjc1YjVkNDA3MzgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MjhUMjAxMjUyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDU1NzJjMTMwZDUzNjNjNGY1YWJjYzc4YjIwZGUxNDU3YjIxMzVhMjU1MjFlY2Q2YTk4ZmRlNDEwYWJlODdiZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.mFdrHTKuaC6TsgCY5Miwg241UiiTCNy8I6ZkQkJPzGE)
from react.
Chrome Version 122.0.6261.129 (Official Build) (64-bit)
Can't reproduce. Refreshes accumulate MB infinitely, but waiting for ~5 seconds or pressing "Collect garbage" flushes everything instantly down to ~10 MB.
Firefox Version 123.0.1 (64-bit)
Measured private window in about:processes
with and without React Dev Tools - memory behavior seems to be the same. Was able to instantly free up memory in about:memory
with Free memory - GC
on both occasions. From ~500 MB to ~210 MB instantly.
I guess not a Chromium or Firefox issue then if both browsers suddenly behave properly, or it can be?
from react.
I see, thanks.
from react.
I see similar behavior when the React Dev Tools is enabled, across all sites. Looking at the heap snapshots, you can see the previous window objects retained and accumulate on every reload. Maybe the Dev Tools is hanging on to a reference for every window object?
from react.
Attempted to triage this, noticed that the required condition for this to happen is chrome.devtools.network.onNavigated
listeners here:
Removing both of them fixes the issue.
Having at least one of them still reproduces the memory leak, which is surprising, given the fact that the first one (syncSavedPreferences) is only using chrome.devtools.inspectedWindow.eval
:
Few ideas:
- I don't have the time right now, but maybe its worth trying to create a small reproducible example of an extension, which uses both
chrome.devtools.network.onNavigated
andchrome.devtools.inspectedWindow.eval
, which has the same memory leak issues? - Does this memory leak happen in Firefox as well?
from react.
Does this memory leak happen in Firefox as well?
I believe it does, yes. Today I noticed excessive memory usage in Firefox. I opened about:processes
and saw "Extensions" using 5GB of memory.
One by one I turned off my extensions (not many, just 4) and watched the report on the memory usage for extensions.
Once I turned off "React Developer Tools" the memory usage for the "Extensions" line in about:processes
went from over 5GB down to 600MB.
While I admit this anecdote isn't conclusive proof I think it serves as evidence that it could happen in firefox as well.
from react.
Similar to @chrishoage, I have also observed this memory leak in Firefox in the form of high memory usage (though I saw it in happening in a React-using content process) which seemed to go away after disabling this extension.
from react.
I am currently exploring an option to switch from chrome.devtools.inspectedWindow.eval
to chrome.scripting.executeScript
.
The main problem for us with this approach is the requirement for executing scripts in MAIN
world, which Firefox doesn't support yet.
from react.
It took me a whole Friday afternoon to finally find the issue came from this plugin.
from react.
My Chrome got updated, and I can't reproduce this on Chrome v122.0.6261.69, can someone confirm this as well?
from react.
chrome v122.0.6261.112 still having this problem.....even if the webpage is not using React at all
subscribed to window 'message' event but consistently receving message with source 'react-devtools-content-sceipt'
from react.
Since we can't reproduce this, I am going to close this. Would be nice if someone can grep the changes from between Chrome 121 and Chrome 122 to identify the affecting commit, but this would require some time.
from react.
Since we can't reproduce this, I am going to close this. Would be nice if someone can grep the changes from between Chrome 121 and Chrome 122 to identify the affecting commit, but this would require some time.
you literally just refresh the tab and see the memory grow.
from react.
Related Issues (20)
- Ensures role attribute has an appropriate value for the element (aria-allowed-role - https://dequeuniversity.com/rules/axe/4.7/aria-allowed-role?application=msftAI) HOT 1
- Ensures ARIA attributes are allowed for an element's role (aria-allowed-attr - https://accessibilityinsights.io/info-examples/web/aria-allowed-attr)Bug: HOT 1
- Bug: HOT 1
- [VLG]¿Cómo hablar con Vueling por teléfono? @telefono españa HOT 1
- hook invalid
- Feature request: Expose additional profiling tools for library testing HOT 5
- Bug: "Should have a queue. This is likely a bug in React" HOT 11
- [React 19]
- [React 19] requestFormReset reports TypeError Cannot read properties of null (reading 'queue') on repeated form submissions HOT 3
- [Compiler Bug]: healthcheck do not check next.js StrictMode HOT 5
- [React 19] Different behaviors with `preload` method HOT 2
- Bug: React 18 SSR Sometimes fallback to CSR without throw any errors on Prod Mode, The fiber node which tag is "HostRoot"(3)has flags "Snapshot"(1024),it works fine when flags is Update(4) HOT 1
- Bug: ForwardRef components cant have display names or types HOT 2
- Consider changing the next property type of the update object of the dispatchSetState function from any to null
- [React 19]
- ..
- [DevTools Bug]: 5.2.0 is not available for Firefox HOT 2
- [DevTools Bug] getCommitTree(): Invalid commit "1" for root "445". There are only "1" commits.
- [eslint-plugin-react-hooks] Missing type declarations HOT 2
- [React 19]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.