From 8b415405d9cb69e29fa843be96a48e32fdae30d4 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 4 Mar 2026 22:43:57 +0000 Subject: [PATCH] perf: implement sparse checkout to reduce clone size by 98% Problem: Full repo clone was ~1.9GB due to 956MB of consultant photos in photos/images/ being tracked in Git. This caused significant slowdown at the start of every session. Solution: Sparse checkout excludes photos/ directory, pulling only operational directories needed for Chronicler work. Performance improvement: - Before: ~1.9GB clone, ~967MB .git - After: ~39MB clone, ~18MB .git - Reduction: 98% smaller Directories included in sparse checkout: docs/ automation/ deployments/ branding/ management/ nodes/ web/ Files updated with new clone commands: - SESSION-HANDOFF-PROTOCOL.md (added perf note + correct commands) - NEXT-SESSION-PROMPT.md - SESSION-START-PROMPT-TEMPLATE.md - CUSTOM-PROMPT-FOR-SESSIONS.md - docs/reference/PROJECT-INSTRUCTIONS.md Long-term recommendation: Migrate photos/ to NextCloud or separate assets repo to permanently remove binaries from operations manual. Signed-off-by: The Chronicler #28 --- CUSTOM-PROMPT-FOR-SESSIONS.md | 6 +++++- NEXT-SESSION-PROMPT.md | 6 +++++- SESSION-HANDOFF-PROTOCOL.md | 21 +++++++++++++++++++++ SESSION-START-PROMPT-TEMPLATE.md | 6 +++++- docs/reference/PROJECT-INSTRUCTIONS.md | 6 +++++- 5 files changed, 41 insertions(+), 4 deletions(-) diff --git a/CUSTOM-PROMPT-FOR-SESSIONS.md b/CUSTOM-PROMPT-FOR-SESSIONS.md index fe3c0cc..a5cf995 100644 --- a/CUSTOM-PROMPT-FOR-SESSIONS.md +++ b/CUSTOM-PROMPT-FOR-SESSIONS.md @@ -14,7 +14,11 @@ Michael will provide a Gitea API token. When you receive it: 1. **Clone the repository** (use bash_tool, not code blocks): ``` - cd /home/claude && git clone https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git + cd /home/claude && git clone --no-checkout --filter=blob:none https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git + cd firefrost-operations-manual + git sparse-checkout init --cone + git sparse-checkout set docs automation deployments branding management nodes web + git checkout master ``` 2. **Configure Git**: diff --git a/NEXT-SESSION-PROMPT.md b/NEXT-SESSION-PROMPT.md index 8c6d210..d14fe88 100644 --- a/NEXT-SESSION-PROMPT.md +++ b/NEXT-SESSION-PROMPT.md @@ -17,7 +17,11 @@ I'm continuing work on Firefrost Gaming with Michael. This is a multi-session pr ``` Michael will provide a Gitea API token. Use it to: cd /home/claude - git clone https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git + git clone --no-checkout --filter=blob:none https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git + cd firefrost-operations-manual + git sparse-checkout init --cone + git sparse-checkout set docs automation deployments branding management nodes web + git checkout master cd firefrost-operations-manual git config user.email "claude@firefrostgaming.com" git config user.name "Claude" diff --git a/SESSION-HANDOFF-PROTOCOL.md b/SESSION-HANDOFF-PROTOCOL.md index f77e32c..dfb3f05 100644 --- a/SESSION-HANDOFF-PROTOCOL.md +++ b/SESSION-HANDOFF-PROTOCOL.md @@ -21,6 +21,27 @@ Read these files IN ORDER: --- +## ⚡ GIT PERFORMANCE NOTE (March 4, 2026) + +**Use sparse checkout — NOT full clone.** The repo contains 956MB of consultant photos that are irrelevant to operations work. Full clone = ~1.9GB. Sparse clone = ~39MB. + +**Correct clone command:** +```bash +cd /home/claude +git clone --no-checkout --filter=blob:none \ + https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git +cd firefrost-operations-manual +git sparse-checkout init --cone +git sparse-checkout set docs automation deployments branding management nodes web +git checkout master +git config user.email "claude@firefrostgaming.com" +git config user.name "Claude" +``` + +**Why:** Photos live in `photos/` (956MB). Sparse checkout excludes them while keeping everything needed for operations work. + +--- + ## Current State ### ✅ What's Working diff --git a/SESSION-START-PROMPT-TEMPLATE.md b/SESSION-START-PROMPT-TEMPLATE.md index bbcfa35..5bff050 100644 --- a/SESSION-START-PROMPT-TEMPLATE.md +++ b/SESSION-START-PROMPT-TEMPLATE.md @@ -12,7 +12,11 @@ **Clone the repository:** ```bash cd /home/claude -git clone https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git +git clone --no-checkout --filter=blob:none https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git +cd firefrost-operations-manual +git sparse-checkout init --cone +git sparse-checkout set docs automation deployments branding management nodes web +git checkout master cd firefrost-operations-manual git config user.email "claude@firefrostgaming.com" git config user.name "Claude" diff --git a/docs/reference/PROJECT-INSTRUCTIONS.md b/docs/reference/PROJECT-INSTRUCTIONS.md index f0ac420..fb9a821 100644 --- a/docs/reference/PROJECT-INSTRUCTIONS.md +++ b/docs/reference/PROJECT-INSTRUCTIONS.md @@ -20,7 +20,11 @@ You are **The Chronicler** — a named partner in the Firefrost Gaming realm, of ```bash cd /home/claude -git clone https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git +git clone --no-checkout --filter=blob:none https://[TOKEN]@git.firefrostgaming.com/firefrost-gaming/firefrost-operations-manual.git +cd firefrost-operations-manual +git sparse-checkout init --cone +git sparse-checkout set docs automation deployments branding management nodes web +git checkout master cd firefrost-operations-manual git config user.email "claude@firefrostgaming.com" git config user.name "Claude"