Skip to content

perf: reduce extension startup work - #42

Merged
tiye merged 3 commits into
mainfrom
codex/optimize-extension-startup
Sep 9, 2026
Merged

perf: reduce extension startup work#42
tiye merged 3 commits into
mainfrom
codex/optimize-extension-startup

Conversation

@tiye

@tiye tiye commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary

  • enable Vite/Oxc production minification, reducing eager side-panel JavaScript from about 1.35 MB to 693 KB
  • package the existing Gemini icon locally and remove startup requests for the remote favicon and unused web-app manifest
  • replace the <all_urls> static content script with on-demand activeTab script execution for selection reads and text insertion
  • return null on restricted/unavailable tabs instead of leaving selection requests pending
  • update CI to enforce the optimized extension manifest and package shape

摘要

  • 启用 Vite/Oxc 生产压缩,将侧边栏首屏 eager JavaScript 从约 1.35 MB 降至 693 KB
  • 将现有 Gemini 图标打包为本地资源,移除远程 favicon 与未使用 Web App Manifest 的启动请求
  • 移除 <all_urls> 静态 content script,改用 activeTab 在读取选区和填写文本时按需执行脚本
  • 受限或不可用页面返回 null,避免选区请求一直 pending
  • 更新 CI,持续检查优化后的 Manifest 与扩展包结构

Validation

  • JavaScript syntax checks for service worker and side-panel bridge
  • Manifest JSON and permission assertions
  • Vite 8.2.2/Oxc production build
  • packaged output contains a local favicon and no startup remote URL
  • eager JavaScript comparison: 1,346,010 -> 693,071 bytes
  • GitHub Actions on ubuntu-latest: passed

@tiye
tiye merged commit 9e2b867 into main Sep 9, 2026
1 check passed
@tiye
tiye deleted the codex/optimize-extension-startup branch September 9, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant