Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

bit Boilerplate's WebAssembly app takes too long to become interactive

未关闭
#14,115 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@yasmoradi 已经在做这个了。

开始于 2026年10月22日。

  • #14116 来自 @yasmoradi —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
15/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
csharp, wasm

调研方向

Start by reproducing the reported startup timings on the sales demo and inspecting the local build’s Playwright measurements and CPU profile. The report points to the CSP meta tag, first interactive render, reflection, the account menu, BitTimeZonePicker, App Insights setup, and the AOT demos, but does not define which of these should change. Treat the work as done when a scoped performance change is agreed and verified against the reported interaction delays; pull request #14116 is already open.

由索引模型根据 Issue 内容生成。

描述

bit Boilerplate's Blazor WebAssembly app takes far too long to become interactive. On https://sales.bitplatform.dev the prerendered page shows quickly, but clicks only work after about 4 seconds on a fast desktop and about 16 seconds with the CPU throttled 4x (roughly a mid range phone).

Measured with Playwright and a CPU profile of the same app built locally:

  • The Content-Security-Policy <meta> tag at the top of the head turns off Chromium's preload scanner. The 9 stylesheets and the scripts at the end of the body then download one after another. On a 150ms latency network blazor.web.js runs at 2.2s instead of 0.75s, and the app becomes interactive at 11.3s instead of 8.5s.
  • The first interactive render is one long task: 1.5s on a desktop, 9s with 4x CPU throttling. Even the nearly empty not found page takes 8s, so most of it is the layout plus the interpreter running each method for the first time.
  • About 38% of that managed time is reflection: component metadata, System.Text.Json metadata for JS interop arguments and DataAnnotations validation of the settings at startup (about 0.7s at 4x).
  • The account menu renders all of its content while it is closed, and BitTimeZonePicker builds its whole list of time zones in OnInitialized although it only shows the selected one (about 1.1s at 4x).
  • The App Insights JS SDK setup runs inside that first render (about 0.5s at 4x).
  • The AOT demos compile every method ahead of time. todo-aot downloads about 10MB (dotnet.native.wasm alone is 7.7MB brotli), and its first render still blocks for 1.4s on a desktop and 8.5s at 4x.
主要语言
C#
星标
1.4k
派生
264
平均合并
13 小时 15 分钟
30 天内合并 PR
344

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bitfoundation/bitplatform 的其他 Issue

查看 bitfoundation/bitplatform 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。