proxy-agents icon indicating copy to clipboard operation
proxy-agents copied to clipboard

Lazily load agents in proxy-agent

Open addaleax opened this issue 1 year ago • 3 comments

Some of the references packages can be quite expensive to instantiate (e.g. pac-proxy-agent and its custom JS runtime), so lazily loading them enables fast loading times for the more common cases.

addaleax avatar Aug 07 '24 13:08 addaleax

🦋 Changeset detected

Latest commit: bce985e3c97fc0a00af6d8d7414a394490883364

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
proxy-agent Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Aug 07 '24 13:08 changeset-bot[bot]

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
proxy-agents ✅ Ready (Inspect) Visit Preview Aug 7, 2024 1:42pm

vercel[bot] avatar Aug 07 '24 13:08 vercel[bot]

Just wanted to give a major thumbs up to this - proxy-agents is a dependency of Puppeteer, which is used in CI a lot. In our setup, we actually went to the length of stubbing pac-proxy-agent via require.cache to prevent it from being loaded (the entire proxy-agent setup is unused by puppeteer for anyone not using a proxy).

developit avatar Sep 19 '24 14:09 developit

Nice stuff Anna, thank you!

pac-proxy-agent similarly depends on the other proxy agent classes, perhaps we should take a similar approach there as well.

TooTallNate avatar Dec 05 '24 05:12 TooTallNate