-
Notifications
You must be signed in to change notification settings - Fork 362
Continue network recording when navigating away from Network screen. #9491
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
base: master
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| @override | ||
| void dispose() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is dispose() actively called when we switch screens now? I seem to recall the network profiler continuing to work after navigating away from the network screen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was the mechanism for the network controller to stop recording, so something is calling it. I didn't look to see where.
|
I'm concerned that this might have some performance costs if a user navigates away from the network panel without pausing the recording and then never navigates back to stop recording. Do we know what the performance implications here are? |
Good question. I can look into how much memory creeps up with a thousand network requests or something. Both of DevTools and the app-under-test. |
|
I found that it uses a surprising amount of memory! After repeatedly sending very small POST requests, which receive very simple responses, I see that 3000 requests resulted in 1.4GB additional RSS! That's 500k / request, which seems... bonkers. Nevertheless, storing many logged requests does increase memory use significantly. @bkonyi I don't think there is a mechanism to remove "stale" logged network request data, is there? Meaning, whenever we click "Clear" in the DevTools Network screen, we could send a VM service message to throw away all existing logged data. |
That sounds excessive! I'd be interested to see what's causing that much memory to be used.
I think this is what you're looking for 😄 https://pub.dev/documentation/vm_service/latest/vm_service/DartIOExtension/clearHttpProfile.html |

Work towards #9489
In this PR, we change the behavior of navigating away from the Network screen. Previously, any time the user navigates away, we stop recording. This has been determined to be surprising behavior. Instead we can continue recording while the user is away.
We can make other UX changes to make it obvious whether network requests are being logged or not. I'll do that in a separate CL.