Skip to content

Startup time improvements #544

Merged
whoiskatrin merged 14 commits intocloudflare:mainfrom
whoiskatrin:startup-time-opt
Oct 10, 2025
Merged

Startup time improvements #544
whoiskatrin merged 14 commits intocloudflare:mainfrom
whoiskatrin:startup-time-opt

Conversation

@whoiskatrin
Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Oct 8, 2025

🦋 Changeset detected

Latest commit: f3bbd71

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Oct 8, 2025

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/agents@544

commit: f3bbd71

@dnyg
Copy link
Copy Markdown

dnyg commented Oct 9, 2025

I think these are some good solid improvements, and the remaining problems all lie in the import of @modelcontextprotocol/sdk because it utilizes the ajv library that is taking up most of the startup time at this point
Screenshot 2025-10-09 at 09 01 50

@whoiskatrin whoiskatrin marked this pull request as ready for review October 9, 2025 07:39
@whoiskatrin whoiskatrin changed the title Startup time opt Startup time improvements Oct 9, 2025
Copy link
Copy Markdown
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

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

approving

an unfortunate failure case is that anyone importing ai themselves in app code might defeat this optimisation

we should still push on proper fixes to zod/ajv

but glad this should unblock some people

@whoiskatrin whoiskatrin merged commit afd9efd into cloudflare:main Oct 10, 2025
3 checks passed
@whoiskatrin whoiskatrin deleted the startup-time-opt branch October 10, 2025 16:16
@threepointone threepointone mentioned this pull request Oct 10, 2025
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.

3 participants