node icon indicating copy to clipboard operation
node copied to clipboard

lib: allow CJS source map cache to be reclaimed

Open legendecas opened this issue 1 year ago • 1 comments

Unifies the CJS and ESM source map cache map and allows the CJS cache entries to be queried more efficiently with a source url without iteration on an IterableWeakMap. Reclaims the CJS cache entry with a FinalizationRegistry instead.

Add a regression test to verify that the CJS source map cache entry can be reclaimed.

legendecas avatar Feb 09 '24 13:02 legendecas

Review requested:

  • [ ] @nodejs/loaders

nodejs-github-bot avatar Feb 09 '24 13:02 nodejs-github-bot

@aduh95 @joyeecheung would you mind taking a look again? Thank you!

legendecas avatar Mar 15 '24 02:03 legendecas

CI: https://ci.nodejs.org/job/node-test-pull-request/57812/

nodejs-github-bot avatar Mar 18 '24 16:03 nodejs-github-bot

@joyeecheung would you mind taking another look at this? Thank you!

legendecas avatar Mar 27 '24 13:03 legendecas

CI: https://ci.nodejs.org/job/node-test-pull-request/59466/

nodejs-github-bot avatar May 27 '24 23:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/59480/

nodejs-github-bot avatar May 28 '24 08:05 nodejs-github-bot

CI is green. @joyeecheung @aduh95 would be great to have another review, thanks!

legendecas avatar May 28 '24 21:05 legendecas

Stress test: https://ci.nodejs.org/job/node-stress-single-test/508 (passed)

legendecas avatar May 28 '24 22:05 legendecas

Landed in c0c598d753d5ce7e1721215c6e6254dc02c023a8

nodejs-github-bot avatar May 28 '24 22:05 nodejs-github-bot