Computing the call stack on web can be slow, and we have to do the entire thing even when VS Code only wants the top 20 frames.
The VM service is getting support for fetching a slice:
dart-lang/sdk@89de1e8
And I found that if we just give VS Code a totalFrames or requestedFrames + batchSize, it will happily call us multiple times with batches (this is not spec'd behaviour, but it seems worth the trade-off of possibly having to revert/update in future).