perf: 全主题性能基线、运行时修复与低风险优化#3981
Merged
Merged
Conversation
Add clear server/runtime theme source logs and normalize query theme resolution so developers can see why final theme comes from query, Notion config, or local config.
Optimize build and runtime fundamentals by removing costly webpack overrides, reducing cache/data-path overhead, and adding baseline measurement tooling so performance regressions are easier to detect.
Drop heavy react-share usage in favor of lightweight share links, add preview-image webp generation with png fallback, and align image components to reduce client payload and improve first load.
Preserve internal link query state for theme previews, remove invalid hook usage from site config access, and harden mermaid plus dark-mode content styles to prevent freezes and improve visual consistency.
Lower client CPU overhead by scoping observers to article content, lazily initializing zoom handling, and skipping Prism/Mermaid work when pages do not contain code blocks.
Resolve key/default-props/link-prop runtime warnings and add a reusable theme performance audit script so theme-level regressions can be scanned consistently.
Run a full theme performance scan in production mode, commit the latest audit reports, and document mandatory theme audit checks so future theme work follows a consistent performance gate.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying notionnext-blog with
|
| Latest commit: |
e513b30
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://55e7a4cf.notionnext-db5.pages.dev |
| Branch Preview URL: | https://chore-perf-audit-issues-base.notionnext-db5.pages.dev |
Bump project patch version and add a complete package.json script reference in the developer guide so contributors can understand and run each workflow command consistently.
Deploying notionnext-docs with
|
| Latest commit: |
e513b30
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://74277595.notionnext-docs.pages.dev |
| Branch Preview URL: | https://chore-perf-audit-issues-base.notionnext-docs.pages.dev |
Deploying notionnext-movie with
|
| Latest commit: |
e513b30
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://62459350.notionnext-movie.pages.dev |
| Branch Preview URL: | https://chore-perf-audit-issues-base.notionnext-movie.pages.dev |
Add a Chinese contribution guide and update both CN/EN README navigation sections so contributor onboarding docs are fully bilingual and consistently linked.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
本 PR 聚焦“先发现问题 + 建立全主题性能基线 + 修复运行时回归”,为后续分阶段性能优化提供可执行标准。
本次改动(完整)
1. 性能审计与基线落库
scripts/audit-theme-performance.jsyarn perf:audit:themesyarn build && yarn start)下重跑并提交最新结果:docs/performance/theme-audit-latest.mddocs/performance/theme-audit-latest.json2. 开发规范与文档
DEVELOPMENT.md增加“新主题性能准入(必做)”流程DEVELOPMENT.md新增package.json全量脚本用途说明(逐条解释)package.json版本号提升:4.9.5.1 -> 4.9.5.2CONTRIBUTING.zh-CN.md3. 低风险性能优化
4. 运行时稳定性修复
Invalid hook call(普通函数中不再调用 Hook)key警告与defaultProps弃用警告验证
yarn lint(分文件针对性验证)yarn type-checkyarn buildyarn startyarn perf:audit:themes(生产模式)说明
本 PR 主要完成“问题发现、基线建立、低风险改进、规范落地”;下一阶段将基于基线结果对低分主题(如
gitbook/fukasawa/fuwari/commerce/hexo)进行定向 LCP/CLS/TBT 优化。