dart-lang / dart-lang/webdev

Gather Dart scripts from the build system and not through Chrome

Open
#907 1 comment 0 reactions 0 assignees View on GitHub
package:dwds
Dominant language
Dart
Stars
224
Forks
94
Avg merge
7h 14m
Merged PRs (30d)
2

Description

We collect the available Dart scripts through a number of Chrome evaluations. For significantly large applications, e.g. 20k+ Dart sources, this process is quite slow.

In particular, we collect all of the Dart modules here:
https://github.com/dart-lang/webdev/blob/446fb9d63875a765fa3704c71ed76ede61a51325/dwds/lib/src/debugging/inspector.dart#L278

The above evaluation can take upwards of 6 seconds.

We then turn around to get all of the scripts with this evaluation:
https://github.com/dart-lang/webdev/blob/446fb9d63875a765fa3704c71ed76ede61a51325/dwds/lib/src/debugging/inspector.dart#L365

The above evaluation can take upwards of two seconds. It's also worth noting that the size of the evaluation string can be insanely large.

Ideally, we should gather the Dart sources directly from the build system which will almost certainly be much much faster.

Contributor guide

Open the contributing guide

Research direction

Start in dwds/lib/src/debugging/inspector.dart at the module collection around line 278 and the script collection around line 365. Trace how these Chrome evaluations obtain Dart sources, then identify the build-system entry point that can provide them directly. Done means the Chrome evaluations and oversized evaluation string are no longer needed for collecting Dart scripts, while the existing script set remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
performance, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.