Use shorter library IDs and names
- Dominant language
- Dart
- Stars
- 224
- Forks
- 94
- Avg merge
- 7h 14m
- Merged PRs (30d)
- 2
Description
Currently `LibraryRef`s returned from `getIsolate` contain the library url three times - as Id, name, and uri. Isolate object contains a list of libraries that reaches a 1.7Mb for the ACX demo gallery.
Shortening the Id and the name might make the isolate smaller, take less memory in dwds and DevTools internal state, and even reduce the DevTools IPL. Might want to investigate and copy what VM does.
Example:
```
"libraries": [
{
"type": "@Library",
"id": "dart:_runtime",
"name": "dart:_runtime",
"uri": "dart:_runtime"
},
...
{
"type": "@Library",
"id": "package:collection/src/combined_wrappers/combined_iterator.dart",
"name": "package:collection/src/combined_wrappers/combined_iterator.dart",
"uri": "package:collection/src/combined_wrappers/combined_iterator.dart"
},
]
```
Contributor guide
Research direction
Start by tracing getIsolate and the LibraryRef construction that produces each library's id, name, and uri. Compare the representation with the VM, then measure the isolate size and internal-state impact; done means shorter ids and names reduce duplication while preserving the library uri and expected behavior.
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
- Needs clarification
- Newbie friendliness
- 30/100