sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[DAP] Use Service ID zones where beneficial

Open derekxu16 opened this issue 1 year ago • 3 comments

The APIs for managing Service ID zones have been released in package:vm_service 14.3.0. These APIs can be used to free object IDs when they are no longer needed, to ensure that objects associated with those IDs are not retained for longer than necessary.

derekxu16 avatar Sep 26 '24 19:09 derekxu16

@DanTup now that this functionality has landed in vm service what is the possibility of wiring this up in DAP

a-siva avatar Oct 10 '24 17:10 a-siva

I'm hoping to look at this soon, I think it should be fairly straight-forward. The DAP spec says that variableReferences (which roughly map to the InstanceRefs we get from the VM) expire when execution resumes, so it should be fairly simple to manage the zone lifetimes around that.

DanTup avatar Oct 10 '24 20:10 DanTup

I've a change in progress for this, but I want to do some additional manual testing with Dart+Flutter. I have a slight concern about race conditions (eg. we decide to invalidate a zone, but at the same time we start processing some event like a debugger pause where we might evaluate breakpoint conditions) and the tests don't tend to generate the same level of traffic as a real app.

(If someone is able to trigger the trybots in the meantime though, that would be appreciated!)

DanTup avatar Oct 14 '24 16:10 DanTup