-
-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
I don't see why a trie is used here. Tries are good when prefixes group items logically or when you're genuinely receiving one character at a time, but I don't think this happens in HTML entities. Using a trie is making the bundle size larger:
| Compression | decode-data-html.ts | entities.json + legacy.json |
|---|---|---|
| None | 47,759b |
34,333b (72%) |
gzip -c |
19,589b |
11,620b (59%) |
zstd --ultra -22 |
16,651b |
10,730b (64%) |
This isn't isolated. entities is substantially larger than html-entities (compare: entities vs html-entities), and takes up half of the htmlparser2 bundle (visualization) because of that.
Metadata
Metadata
Assignees
Labels
No labels