[turbopack] Optimize cell_dependency representation (#94717)
Split the representtation of cell dependencies to split `hashed` and
`non-hashed` dependencies into separate structures
Hashed deps are rare but the bloat the size of the edge representation
so a distinct field can optimize for the common case.
| | canary | branch | delta | persistence disabled | gap |
-------------------------|----------|----------|------------------|
---------------------- | ---------|
| maxRSS median | 16.74 GB | 15.69 GB | −1.05 GB (−6.2%) | 13.86 GB |
1.83 GB |
| maxRSS max (worst run) | 18.14 GB | 16.19 GB | −1.95 GB | 14.16 GB |
2.03 GB |
This closes 1/3 of the gap from enabling persistence.
Time metrics were ~neutral but i didn't take the time to quiet my
machine. I would assume there is a small perf benefit from this
approach, but memory is the goal