Repository navigation
perf: 検索・ツリー・ライブリロード・静的配信を高速化 - #34
Merged
Merged
Conversation
- テキストデコード: 純 ASCII (ESC/SO/SI なし) のファイルは jschardet を省略。 対応する全エンコーディングでデコード結果が同一になるため出力は不変 (lib/text-decode.mjs に切り出し) - 通常検索: ファイル全体の小文字化で含有を事前判定し、該当しないファイルの 行分割・走査を省略 - /api/tree: ディレクトリ内エントリの stat を最大 8 並列で実行 (サブディレクトリは従来どおり逐次、readdir 順を保持) - ファイルツリー: SSE の add/unlink 連続イベントを、実行中の再取得 + 追従 1 回に集約 - /assets/* (ハッシュ付き) に Cache-Control: immutable を付与 ベースラインとの API 出力のバイト一致、ユニットテスト 53 件、E2E 418 件の成功を確認。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L4uUUeXGVEGsFu5bRYbQAU
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
概要
既存の機能・API 出力を変えずに、実測で確認したボトルネックを解消します。
jschardet) を省略lib/text-decode.mjsに切り出しİ・結合文字を含む約 41.5 万行のファジングで確認/api/tree: ディレクトリ内エントリのstatを最大 8 並列 (lib/concurrency.mjs)/assets/*(Vite のハッシュ付きファイル) にCache-Control: public, max-age=31536000, immutableを付与index.html・SPA フォールバック応答・ハッシュなしファイルは対象外測定結果 (7,020 ファイルのフィクスチャ、各 2〜3 回測定)
/api/treep50/api/tree(59,100 ファイル) p50/api/tree4 並列実行時の p50/api/tree回数 / サーバー CPU採用しなかった案
テスト
tests/text-decode.test.mjs(常に検出器を使う旧実装との一致: エッジケース・ファジング・リポジトリ内全ファイル)、tests/concurrency.test.mjs、tests/server-audit.test.mjsに検索とツリーの出力を固定するテスト 2 件。追加したサーバーテストは変更前のコードでも成功することを確認済みnpm run test:unit: 53 件成功 / 1 件スキップ (既存のもの)npx playwright test: 418 件成功 / 3 件スキップ (ローカル実行時はプリインストールの Chromium を使用)tsc/vite build/npm run check:contrast: 成功.docviewignore・Shift_JIS・meta charset) を含む 3 種類のフィクスチャで、主要 API のレスポンスが変更前とバイト単位で一致未検証
Generated by Claude Code