|
| 1 | +# Deployment Pipeline Performance Investigation Context |
| 2 | + |
| 3 | +## Problem Statement |
| 4 | +The deployment pipeline has become significantly slow after adding images to the public folder (used in README). The affected operations include: |
| 5 | +- `just package` - Building and packaging the extension |
| 6 | +- `just install` (install-package) - Installing the packaged extension locally |
| 7 | +- `just publish` - Publishing to VS Code Marketplace and Open VSX Registry |
| 8 | + |
| 9 | +## Critical Finding: Public Folder NOT Excluded |
| 10 | +**⚠️ MAJOR ISSUE IDENTIFIED**: The `/public` folder at the root level is NOT listed in `.vscodeignore`, meaning ALL images and files in this folder are being included in the VSIX package. |
| 11 | + |
| 12 | +## Pipeline Architecture Overview |
| 13 | + |
| 14 | +### 1. Package Command Flow (`just package`) |
| 15 | +``` |
| 16 | +just package |
| 17 | +├── clean-build (removes old build artifacts) |
| 18 | +│ ├── rm -rf src/web-view/dist |
| 19 | +│ ├── rm -rf src/extension/web-view-dist |
| 20 | +│ └── rm -rf out |
| 21 | +├── Build web-view |
| 22 | +│ └── cd src/web-view && yarn build |
| 23 | +│ └── tsc -b && vite build |
| 24 | +├── Copy web-view dist |
| 25 | +│ └── cp -r src/web-view/dist → src/extension/web-view-dist |
| 26 | +├── Compile extension |
| 27 | +│ └── cd src/extension && yarn compile |
| 28 | +│ └── tsc -p ./ |
| 29 | +└── Package extension |
| 30 | + └── cd root && yarn package |
| 31 | + └── vsce package --out versions/ |
| 32 | + └── Creates VSIX file including ALL non-ignored files |
| 33 | +``` |
| 34 | + |
| 35 | +### 2. Install Command Flow (`just install-package`) |
| 36 | +``` |
| 37 | +just install-package |
| 38 | +└── cd root && yarn install-package |
| 39 | + └── code --install-extension versions/quick-command-buttons-$version.vsix |
| 40 | + └── VS Code extracts and installs the VSIX package |
| 41 | +``` |
| 42 | + |
| 43 | +### 3. Publish Command Flow (`just publish`) |
| 44 | +``` |
| 45 | +just publish [target] |
| 46 | +├── VS Code Marketplace (if target = vsce or both) |
| 47 | +│ └── yarn vsce-publish |
| 48 | +│ └── vsce publish (uploads VSIX to marketplace) |
| 49 | +└── Open VSX Registry (if target = ovsx or both) |
| 50 | + └── yarn ovsx-publish |
| 51 | + └── ovsx publish (uploads VSIX to registry) |
| 52 | +``` |
| 53 | + |
| 54 | +## File Inclusion Analysis |
| 55 | + |
| 56 | +### What Gets Included in VSIX Package |
| 57 | +Based on `.vscodeignore` analysis: |
| 58 | + |
| 59 | +**INCLUDED (Potential Performance Impact):** |
| 60 | +- ✅ `/public/` folder - **NOT EXCLUDED, ALL IMAGES INCLUDED** |
| 61 | +- ✅ `/versions/` folder - Previous VSIX files if present |
| 62 | +- ✅ `/out/` folder - Compiled extension code |
| 63 | +- ✅ `/src/extension/web-view-dist/` - Built web view assets |
| 64 | +- ✅ `package.json`, `README.md`, `LICENSE` |
| 65 | + |
| 66 | +**EXCLUDED (Properly Ignored):** |
| 67 | +- ❌ Source TypeScript files |
| 68 | +- ❌ Node modules from sub-projects |
| 69 | +- ❌ Development configuration files |
| 70 | +- ❌ Test files and coverage reports |
| 71 | +- ❌ Git history and CI/CD configurations |
| 72 | + |
| 73 | +## Performance Bottleneck Analysis |
| 74 | + |
| 75 | +### 1. Image Files in Public Folder |
| 76 | +- **Location**: `/public/` (root level) |
| 77 | +- **Issue**: NOT in `.vscodeignore`, so ALL images are packaged |
| 78 | +- **Impact**: |
| 79 | + - Increases VSIX file size dramatically |
| 80 | + - Slows down packaging process |
| 81 | + - Slows down upload to marketplaces |
| 82 | + - Slows down local installation |
| 83 | + |
| 84 | +### 2. Packaging Process (`vsce package`) |
| 85 | +The VSCE tool: |
| 86 | +1. Reads all files not in `.vscodeignore` |
| 87 | +2. Bundles them into a ZIP-like VSIX archive |
| 88 | +3. Large images significantly slow this process |
| 89 | + |
| 90 | +### 3. Publishing Process |
| 91 | +- Large VSIX files take longer to upload to: |
| 92 | + - VS Code Marketplace |
| 93 | + - Open VSX Registry |
| 94 | +- Network transfer time increases linearly with file size |
| 95 | + |
| 96 | +### 4. Installation Process |
| 97 | +- VS Code must extract larger VSIX files |
| 98 | +- More disk I/O for larger packages |
| 99 | +- Verification and installation take longer |
| 100 | + |
| 101 | +## Dependency Chain Analysis |
| 102 | + |
| 103 | +``` |
| 104 | +deps (install all dependencies) |
| 105 | +├── deps-root (yarn install in root) |
| 106 | +├── deps-extension (yarn install in src/extension) |
| 107 | +└── deps-web-view (yarn install in src/web-view) |
| 108 | +
|
| 109 | +package (build everything) |
| 110 | +├── Depends on: clean-build |
| 111 | +├── Depends on: web-view build |
| 112 | +├── Depends on: extension compile |
| 113 | +└── Creates: versions/*.vsix |
| 114 | +
|
| 115 | +install-package |
| 116 | +└── Depends on: package (VSIX must exist) |
| 117 | +
|
| 118 | +publish |
| 119 | +└── Depends on: package (VSIX must exist) |
| 120 | +``` |
| 121 | + |
| 122 | +## Specific Investigation Areas |
| 123 | + |
| 124 | +### Immediate Actions Needed |
| 125 | +1. **Check Public Folder Contents** |
| 126 | + ```bash |
| 127 | + ls -la /workspaces/quick-command-buttons/public/ |
| 128 | + du -sh /workspaces/quick-command-buttons/public/ |
| 129 | + find /workspaces/quick-command-buttons/public -type f -size +100k -exec ls -lh {} \; |
| 130 | + ``` |
| 131 | + |
| 132 | +2. **Measure VSIX File Size** |
| 133 | + ```bash |
| 134 | + ls -lh /workspaces/quick-command-buttons/versions/*.vsix |
| 135 | + ``` |
| 136 | + |
| 137 | +3. **Analyze VSIX Contents** |
| 138 | + ```bash |
| 139 | + # Extract and examine what's inside the VSIX |
| 140 | + cd /tmp && unzip -l /workspaces/quick-command-buttons/versions/*.vsix | head -50 |
| 141 | + ``` |
| 142 | + |
| 143 | +### Root Cause Hypothesis |
| 144 | +The `/public` folder containing images for the README is being included in the VSIX package because it's not listed in `.vscodeignore`. This causes: |
| 145 | +1. Bloated VSIX file size |
| 146 | +2. Slow packaging due to processing large image files |
| 147 | +3. Slow uploads during publishing |
| 148 | +4. Slow extraction during installation |
| 149 | + |
| 150 | +### Recommended Solutions |
| 151 | + |
| 152 | +#### Solution 1: Add public folder to .vscodeignore |
| 153 | +Add to `.vscodeignore`: |
| 154 | +``` |
| 155 | +# Public assets (not needed in extension) |
| 156 | +public/ |
| 157 | +!public/logo.png # Keep only the extension icon if needed |
| 158 | +``` |
| 159 | + |
| 160 | +#### Solution 2: Move README images elsewhere |
| 161 | +- Create a `docs/images/` folder for README images |
| 162 | +- Update README to reference images from docs folder |
| 163 | +- Add `docs/` to `.vscodeignore` |
| 164 | + |
| 165 | +#### Solution 3: Use external image hosting |
| 166 | +- Host README images on GitHub or CDN |
| 167 | +- Reference them via URLs in README |
| 168 | +- Remove large images from repository |
| 169 | + |
| 170 | +### Performance Metrics to Collect |
| 171 | + |
| 172 | +Before optimization: |
| 173 | +```bash |
| 174 | +# Time the package command |
| 175 | +time just package |
| 176 | + |
| 177 | +# Check VSIX size |
| 178 | +ls -lh versions/*.vsix |
| 179 | + |
| 180 | +# Time the install command |
| 181 | +time just install-package |
| 182 | + |
| 183 | +# Check what's in the VSIX |
| 184 | +unzip -l versions/*.vsix | wc -l # Count files |
| 185 | +unzip -l versions/*.vsix | grep -E '\.(png|jpg|jpeg|gif|svg)' | wc -l # Count images |
| 186 | +``` |
| 187 | + |
| 188 | +After optimization: |
| 189 | +- Re-run the same commands |
| 190 | +- Compare file sizes and execution times |
| 191 | + |
| 192 | +## Next Agent Actions |
| 193 | + |
| 194 | +1. **Investigation Agent**: |
| 195 | + - Examine `/public` folder contents and sizes |
| 196 | + - Analyze current VSIX file size and contents |
| 197 | + - Time current operations for baseline |
| 198 | + |
| 199 | +2. **Implementation Agent**: |
| 200 | + - Add appropriate entries to `.vscodeignore` |
| 201 | + - Potentially reorganize image assets |
| 202 | + - Test packaging after changes |
| 203 | + |
| 204 | +3. **Validation Agent**: |
| 205 | + - Verify extension still works after optimization |
| 206 | + - Ensure README images still display correctly |
| 207 | + - Measure performance improvements |
| 208 | + |
| 209 | +## Critical Configuration Files |
| 210 | + |
| 211 | +- **/.vscodeignore** - Controls what gets packaged (MISSING /public exclusion) |
| 212 | +- **/justfile** - Defines all build commands |
| 213 | +- **/package.json** - Extension manifest and scripts |
| 214 | +- **/src/extension/package.json** - Extension-specific build |
| 215 | +- **/src/web-view/package.json** - Web view build configuration |
| 216 | + |
| 217 | +## Summary |
| 218 | + |
| 219 | +The root cause is almost certainly that the `/public` folder is not excluded in `.vscodeignore`, causing all images to be packaged into the VSIX file. This creates a cascading performance impact through the entire deployment pipeline: package → install → publish. |
| 220 | + |
| 221 | +The solution is straightforward: exclude unnecessary files from the VSIX package by properly configuring `.vscodeignore`. |
0 commit comments