Remote server bundle duplicates concurrent collection downloads
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js, typescript
- Domain
- backend, performance
Research direction
Run the linked repro's original and fixed fixtures with the provided Node and pnpm commands, then compare their verification results. The fix is done when concurrent requests produce exactly one cold collection download while warm caching works and fetch/JSON, including falsey JSON, failures can be retried.
Written by the indexing model from the issue text.
Description
When several server API requests ask for different icons from the same cold remote collection, each request starts its own full collection download. The cache is assigned only after fetch(...).json() resolves, leaving concurrent callers uncached.
In a production Node server with 20 overlapping API requests and a 49,940-byte synthetic collection, the current package makes 20 origin requests and transfers 998,800 uncompressed body bytes. Sharing the pending fetch reduces this to one request and 49,940 bytes.
Minimal reproduction: https://github.com/onmax/repros/tree/repro/nuxt-icon-perf-remote-collection-dedup/nuxt-icon-perf-remote-collection-dedup
git clone --depth 1 --branch repro/nuxt-icon-perf-remote-collection-dedup https://github.com/onmax/repros.git nuxt-icon-repro
cd nuxt-icon-repro/nuxt-icon-perf-remote-collection-dedup
npx --yes [email protected] [email protected] --call 'pnpm install --frozen-lockfile && pnpm verify'
cd ../nuxt-icon-perf-remote-collection-dedup-fix
npx --yes [email protected] [email protected] --call 'pnpm install --frozen-lockfile && pnpm verify'
The fixed fixture contains a pnpm patch and expects exactly one cold download. Both fixtures also verify warm caching, retry after a fetch/JSON failure, and retry after a falsey JSON result.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nuxt/icon
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
-
Allow separate providers for SSR and client (`provider: { server, client }`)Possibly taken @pont1s claimed this 25 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Similar issues
-
bug skills
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
equinor/fusion-framework#5846 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Eyevinn/open-videocore#1256 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Bug]: Theme preset geist points at undefined --font-geistPossibly taken @claude claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day