site: module import waterfall leaves search inert for about 3 s on 3G; add modulepreload for each page type
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 53/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- performance
Research direction
Read the shared head builder, site/public/index.html, and the reported module import graph; compare the built pages in site/dist/index.html. Add the page specific modulepreload links and update or add a page check that asserts each built page preloads every module it loads. Done when the check passes and, under the stated Fast 3G emulation, shared.mjs finishes within one round trip of app.js.
Written by the indexing model from the issue text.
Description
Why it matters
The homepage is prerendered so it paints fast, but the search box and filters do nothing until the whole ES-module graph and data.js have arrived. A visitor who types in the first seconds sees nothing happen, which is the one interaction the site exists for.
Evidence (at 69387df, Fast 3G / 4x CPU emulation on the local build)
- Resource
responseEnd:app.js1243 ms;search.js,cards.mjs,views.js,owes.js2344-2369 ms (second round trip, discovered only afterapp.jsis parsed);shared.mjs2927 ms (third round trip, imported bycards.mjs);data.js1794 ms (355 KB raw, 79 KB gzip). - Import graph:
app.js->search.js,cards.mjs,views.js;cards.mjs->shared.mjs;shortlist.js->owes.js. site/dist/index.htmlcontains nomodulepreloadlinks (only two font preloads).site/public/index.html:227-229loadsdata.jswithdeferplus two module scripts.
Suggested approach
Have the shared head builder emit <link rel="modulepreload" href="..."> for the exact module set each page type uses (home: 7 files; entry: entry.js, shortlist.js, owes.js; category: category.js, views.js, shortlist.js, owes.js) so every module fetches in parallel with data.js. Optionally fetchpriority="high" on data.js, and consider moving the summary field (about 78 KB of the payload) out of data.js if a slimmer payload is wanted.
Done when
In the same emulation, shared.mjs finishes within one round trip of app.js; a page-check asserts every built page has a modulepreload per module it loads.
- Dominant language
- JavaScript
- Stars
- 58
- Forks
- 15
- Avg merge
- 16h 53m
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a 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 TMHSDigital/Free-Game-Dev-Assets
-
community marketing priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
TMHSDigital/Free-Game-Dev-Assets#151 ·
Maintainers usually reply within 1 day
-
documentation priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
TMHSDigital/Free-Game-Dev-Assets#72 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
TMHSDigital/Free-Game-Dev-Assets#3 · 1 comment ·
Maintainers usually reply within 1 day
-
marketing priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
TMHSDigital/Free-Game-Dev-Assets#152 ·
Maintainers usually reply within 1 day
-
feature priority: medium
Difficulty 5/5 Over a week Newbie friendliness 25/100
TMHSDigital/Free-Game-Dev-Assets#144 ·
Maintainers usually reply within 1 day
All issues in TMHSDigital/Free-Game-Dev-Assets
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vercel-labs/agent-skills#348 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
NanmiCoder/dsh-agent-teams#289 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
c1overzz/dsh-bili-scroll#124 ·
Maintainers usually reply within 1 day