Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

site: module import waterfall leaves search inert for about 3 s on 3G; add modulepreload for each page type

已關閉
#154 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
53/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
javascript
領域
performance

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

performance priority: medium

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.js 1243 ms; search.js, cards.mjs, views.js, owes.js 2344-2369 ms (second round trip, discovered only after app.js is parsed); shared.mjs 2927 ms (third round trip, imported by cards.mjs); data.js 1794 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.html contains no modulepreload links (only two font preloads). site/public/index.html:227-229 loads data.js with defer plus 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.

主要語言
JavaScript
星號
58
分支
15
平均合併
18 小時 42 分鐘
30 天內合併 PR
11

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TMHSDigital/Free-Game-Dev-Assets 的其他 Issue

查看 TMHSDigital/Free-Game-Dev-Assets 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。