Conversation
WalkthroughThe pull request adds two new Markdoc files to the blog section. The first introduces a new author profile for Levi van Noort with basic metadata. The second adds a detailed blog post documenting performance optimizations for Appwrite Sites, covering observability improvements, compression techniques using igzip, Node file tracing implementations, and quantified results showing 30–50% cold-start reductions. Both files are new content additions with no modifications to existing files. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/routes/blog/post/reducing-cold-starts-appwrite-sites/+page.markdoc (1)
48-48: Minor: Inconsistent dash formatting.The sentence has inconsistent spacing around dashes: "download phase - previously" (space-dash-space) vs "steps-dropped" (no spaces). Consider using em-dashes consistently:
✏️ Suggested fix
-Those smaller artifacts translated directly into faster cold starts. With build outputs reduced by up to 99%, the download phase - previously one of the more costly steps-dropped from multiple seconds to just 100–200 milliseconds. Extraction saw a similar improvement, going from regular 4–7 second spikes down to around 200–400 milliseconds. Together, these two phases went from dominating the cold-start timeline to being barely noticeable. +Those smaller artifacts translated directly into faster cold starts. With build outputs reduced by up to 99%, the download phase—previously one of the more costly steps—dropped from multiple seconds to just 100–200 milliseconds. Extraction saw a similar improvement, going from regular 4–7 second spikes down to around 200–400 milliseconds. Together, these two phases went from dominating the cold-start timeline to being barely noticeable.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/routes/blog/post/reducing-cold-starts-appwrite-sites/`+page.markdoc at line 48, The sentence has inconsistent dash spacing ("download phase - previously" vs "steps-dropped"); update the punctuation in the Markdoc content so both occurrences use a consistent em-dash style (e.g., change "download phase - previously" to "download phase—previously" and "steps-dropped" to "steps—dropped") ensuring the same em-dash usage across the paragraph.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/routes/blog/post/reducing-cold-starts-appwrite-sites/`+page.markdoc:
- Line 48: The sentence has inconsistent dash spacing ("download phase -
previously" vs "steps-dropped"); update the punctuation in the Markdoc content
so both occurrences use a consistent em-dash style (e.g., change "download phase
- previously" to "download phase—previously" and "steps-dropped" to
"steps—dropped") ensuring the same em-dash usage across the paragraph.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: bfeea003-300d-4c67-9e3b-dba3340513a1
⛔ Files ignored due to path filters (3)
bun.lockis excluded by!**/*.lockstatic/images/avatars/levi.pngis excluded by!**/*.pngstatic/images/blog/reducing-cold-starts-appwrite-sites/cover.pngis excluded by!**/*.png
📒 Files selected for processing (2)
src/routes/blog/author/levi-van-noort/+page.markdocsrc/routes/blog/post/reducing-cold-starts-appwrite-sites/+page.markdoc
Greptile SummaryThis PR adds a new blog post titled "How we reduced cold start times on Appwrite Sites" along with a new author profile for Levi van Noort. The post covers three main optimizations: adding observability, switching from gzip to igzip for decompression (yielding 50–100% faster extraction), and implementing Node file tracing to dramatically reduce build artifact sizes (up to 99% reduction), with an overall 30–50% cold-start time improvement. Key changes:
Issues found:
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: "Merge branch 'main' ..." |
|
|
||
| # Cold starts | ||
|
|
||
| Those smaller artifacts translated directly into faster cold starts. With build outputs reduced by up to 99%, the download phase - previously one of the more costly steps-dropped from multiple seconds to just 100–200 milliseconds. Extraction saw a similar improvement, going from regular 4–7 second spikes down to around 200–400 milliseconds. Together, these two phases went from dominating the cold-start timeline to being barely noticeable. |
There was a problem hiding this comment.
Missing space creates run-on clause
The phrase steps-dropped is missing a space and a closing dash before dropped. The parenthetical aside - previously one of the more costly steps - requires a matching closing dash to wrap the clause correctly.
| Those smaller artifacts translated directly into faster cold starts. With build outputs reduced by up to 99%, the download phase - previously one of the more costly steps-dropped from multiple seconds to just 100–200 milliseconds. Extraction saw a similar improvement, going from regular 4–7 second spikes down to around 200–400 milliseconds. Together, these two phases went from dominating the cold-start timeline to being barely noticeable. | |
| Those smaller artifacts translated directly into faster cold starts. With build outputs reduced by up to 99%, the download phase - previously one of the more costly steps - dropped from multiple seconds to just 100–200 milliseconds. Extraction saw a similar improvement, going from regular 4–7 second spikes down to around 200–400 milliseconds. Together, these two phases went from dominating the cold-start timeline to being barely noticeable. |
| # Compression and decompression | ||
|
|
||
| With that visibility in place, one pattern stood out immediately: compression and decompression of build output was taking up a significant share of the cold-start time. Build artifacts were being compressed with tar and extracted using gzip, which worked fine functionally, but the extraction step was eating up a noticeable chunk of every first request. | ||
|
|
||
| We tested a drop-in replacement of gzip with [igzip](https://github.com/intel/isa-l), an optimized implementation from Intel's Intelligent Storage Acceleration Library. The results were immediate: extraction times improved by 50–100%, making it one of the highest-impact changes we made. We also evaluated [zstd](https://github.com/facebook/zstd) as an alternative, but its performance was more variable and only showed improvements for certain build output sizes, so we stuck with igzip for its universally consistent gains. | ||
|
|
||
| # Node file tracing | ||
|
|
||
| Faster decompression was a big win, but it also raised an obvious next question: why were we extracting so much in the first place? Many build outputs included dependencies and files that were never actually used at runtime. To tackle this, we implemented [Node file tracing](https://github.com/vercel/nft), which statically analyzes a Node.js application to determine exactly which files are required to run it. | ||
|
|
||
| The impact was dramatic. Smaller artifacts mean less to compress, less to transfer, and less to extract, compounding the gains we had already made on the decompression side. | ||
|
|
||
| Some examples of reductions in size for the templates offered: | ||
|
|
||
| | Templates | Before | After | Reduction | | ||
| | --- | --- | --- | --- | | ||
| | Nuxt Playground | 38.9 MB | 768 KB | 98.1% | | ||
| | Analog Playground | 174.0 MB | 1.6 MB | 99.1% | | ||
| | TanStack Starter | 72.0 MB | 2.3 MB | 96.8% | | ||
| | Astro Playground | 38.7 MB | 16.1 MB | 58.4% | | ||
| | Remix Playground | 36.1 MB | 1.6 MB | 95.6% | | ||
| | Svelte Starter | 27.9 MB | 381 KB | 98.7% | | ||
| | Store Template | 31.1 MB | 4.7 MB | 84.9% | | ||
|
|
||
| # Cold starts | ||
|
|
||
| Those smaller artifacts translated directly into faster cold starts. With build outputs reduced by up to 99%, the download phase - previously one of the more costly steps-dropped from multiple seconds to just 100–200 milliseconds. Extraction saw a similar improvement, going from regular 4–7 second spikes down to around 200–400 milliseconds. Together, these two phases went from dominating the cold-start timeline to being barely noticeable. | ||
|
|
||
| The overall effect was a roughly 30–50% reduction in cold-start duration across the board. The remaining time is now largely spent on runtime initialization rather than transferring and unpacking artifacts. We've shifted the bottleneck to a fundamentally different part of the stack - and that's exactly where we want to focus next. With targeted work there, we expect to bring P95 timings below what P50 used to be. | ||
|
|
||
| # Benefit from this change | ||
|
|
||
| If you're running an SSR-based site on Appwrite Sites, all you need to do is redeploy your latest active deployment. The updated build process will automatically apply the optimizations described above, reducing your build output size and improving cold-start times - no code changes required. | ||
|
|
||
| # What's next | ||
|
|
||
| These improvements are just the beginning. We're actively working on the next round of optimizations. Performance is not a one-time fix - it's an ongoing effort, and we're committed to making every deploy on Appwrite Sites feel instant. Stay tuned for more updates as we continue to push cold start times even lower. |
There was a problem hiding this comment.
Inconsistent section anchor IDs
Only the first heading (# Adding observability) has an anchor ID ({% #adding-observability %}), but the remaining five headings do not. This is inconsistent and prevents deep-linking to individual sections for the other parts of the article.
Consider adding anchor IDs to the remaining headings for consistency:
# Compression and decompression {% #compression-and-decompression %}
# Node file tracing {% #node-file-tracing %}
# Cold starts {% #cold-starts %}
# Benefit from this change {% #benefit-from-this-change %}
# What's next {% #whats-next %}
What does this PR do?
Adds a new blog to the website.
Test Plan
N/A
Related PRs and Issues
N/A
Have you read the Contributing Guidelines on issues?
Yes
Summary by CodeRabbit