Repository navigation
Conversation
Crazelu
marked this pull request as ready for review
October 5, 2026 23:23
marcelomendoncasoares
left a comment
Collaborator
There was a problem hiding this comment.
@Crazelu For reference, have you measured the impact of removing the heuristics on a fresh analyze? This is relevant data to include in the PR description for the future.
Crazelu
marked this pull request as draft
October 6, 2026 16:43
…ments from WatchSession
…ory paths from analysis
…s, distinguish between written and all generated changes
Crazelu
force-pushed
the
fix/future-call-generation-on-serverpod-start
branch
from
October 7, 2026 23:30
f987170 to
e5cf491
Compare
Crazelu
marked this pull request as ready for review
October 8, 2026 00:09
Collaborator
Author
|
@marcelomendoncasoares the benchmark result is up now |
marcelomendoncasoares
requested changes
Oct 8, 2026
marcelomendoncasoares
left a comment
Collaborator
There was a problem hiding this comment.
I made a first review focused mainly on the cache/invalidation, since it is where we can hit most issues (and degrade UX the most).
…yzers that have been updated
…changes outside the file that affect contents of a file
…s to resolve correctly
This was referenced Oct 11, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLI relied on string pattern matching to avoid regeneration runs when nothing of note has changed. That was brittle especially with inheritance support for endpoints and future calls. It also meant that changes to future calls that introduce parameters (future call models) were not correctly tracked on
serverpod start.This PR removes those hacks and relies on the analyzers to build the
GenerationRequirementsfor partial or full generation runs.The analysis and generation paths now use caching where necessary to remove expensive lookups that previously ran on every change including those that do not need generation (some were quadratic).
The analyzers now use file content fingerprinting to track changed files and decide what sets of paths to refresh analysis context with. Stamping has also improved with batches of multiple stamp actions running at once.
The performance gains are more obvious for generation steps. First time analyzer runs are much slower with the heuristics removed but subsequent runs (in --watch mode) are faster than the baseline.
Performance Benchmark Result
Baseline:
29f193bff231d786c4e3d94bb91893fe3176894e. Candidate:360c5dfc0f52dbd4a217a93246703713e0787cfaplus working-tree edits.Generated: 2026-10-08T15:28:13.493910Z. Host: macos Version 26.5.2 (Build 25F84), 8 processors.
Duration: 17 minutes.
Dart: 3.13.0 (stable) (Wed Aug 5 00:28:05 2026 -0700) on "macos_arm64".
Continuous generation (
serverpod generate --watch)One-shot generation (
serverpod generate)Closes #5760
Pre-launch Checklist
///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.If you need help, consider asking for advice on the discussion board.
Breaking changes