Skip to content

feat: blog post cold start improvements#2811

Open
levivannoort wants to merge 6 commits intomainfrom
CLO-4110
Open

feat: blog post cold start improvements#2811
levivannoort wants to merge 6 commits intomainfrom
CLO-4110

Conversation

@levivannoort
Copy link
Member

@levivannoort levivannoort commented Mar 17, 2026

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

  • Documentation
    • Added new author profile for Levi van Noort.
    • Added blog post documenting cold-start performance improvements for Appwrite Sites, including optimization techniques and quantified results showing 30–50% reduction in cold-start duration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Walkthrough

The 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)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat: blog post cold start improvements' directly and specifically describes the main changes, which add a new blog post about cold start performance improvements for Appwrite Sites.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch CLO-4110
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@levivannoort levivannoort marked this pull request as ready for review March 18, 2026 14:58
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 0154be8 and dc75779.

⛔ Files ignored due to path filters (3)
  • bun.lock is excluded by !**/*.lock
  • static/images/avatars/levi.png is excluded by !**/*.png
  • static/images/blog/reducing-cold-starts-appwrite-sites/cover.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • src/routes/blog/author/levi-van-noort/+page.markdoc
  • src/routes/blog/post/reducing-cold-starts-appwrite-sites/+page.markdoc

@greptile-apps
Copy link

greptile-apps bot commented Mar 18, 2026

Greptile Summary

This 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:

  • New blog post at src/routes/blog/post/reducing-cold-starts-appwrite-sites/+page.markdoc with performance data and a comparison table
  • New author page at src/routes/blog/author/levi-van-noort/+page.markdoc
  • New static assets: author avatar and blog cover image
  • Minor bun.lock integrity hash update for @appwrite.io/specs

Issues found:

  • A missing closing dash and space on line 48 (steps-droppedsteps - dropped) makes the parenthetical clause grammatically incorrect
  • Only the first section heading carries an anchor ID ({% #adding-observability %}); the remaining five headings are missing theirs, breaking deep-link consistency

Confidence Score: 4/5

  • Safe to merge after fixing the minor punctuation error and adding missing heading anchor IDs.
  • The PR is content-only (a blog post + author page) with no functional code changes. The only issues are a punctuation typo on line 48 and inconsistent anchor IDs on section headings — both are low-risk editorial issues that don't affect site functionality but would appear in the published article.
  • src/routes/blog/post/reducing-cold-starts-appwrite-sites/+page.markdoc — review the punctuation fix on line 48 and add missing anchor IDs to section headings.

Important Files Changed

Filename Overview
src/routes/blog/post/reducing-cold-starts-appwrite-sites/+page.markdoc New blog post on cold-start improvements; well-structured with good data, but has a missing space/dash in a sentence on line 48 and inconsistent use of heading anchor IDs across sections.
src/routes/blog/author/levi-van-noort/+page.markdoc New author profile page following the existing convention; no issues found.
bun.lock Lockfile update adding an integrity hash for @appwrite.io/specs; expected artifact of running bun install, no issues.

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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

Suggested change
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.

Comment on lines +22 to +58
# 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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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 %}

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