Reading 100 Open PRs on Laravel for Go — And Submitting Our First Performance PR (#421)
Earlier today, while updating our Laravel Rust vs Laravel Go vs Laravel PHP benchmark guide for v0.2.0, we ran a pprof profile on Laravel Go's nested JSON validation benchmark (POST /api/bench6/orders, 20 nested items per request) to understand why it sat at 1,536 RPS while Go's ORM and queue benchmarks were flying.
That profiling session turned into two things: our first pull request to laravel/go-framework (#421), and an afternoon spent reading through 100+ open PRs on the repository. Seeing the ecosystem take shape in real time is genuinely exciting — here are our notes and impressions.
1. Submitting PR #421 — And Why We Cut Our 8.4× Patch Down to 2 Files
In our local prototype across 7 files (internal/dot + validation), we pushed bench6 from 1,536 RPS → 12,844 RPS (8.4× faster) and cut allocations per HTTP request by nearly 90%.
Before opening a PR, we checked the open PR queue and CI rules (.github/workflows/tests.yml: gofmt, go vet, staticcheck@2026.2.2, and go test -race ./... targeting 0.x). Two community PRs were already open on parts of the same hot path:
#271— caching struct fields per type ininternal/dot#335— caching validation schema plans invalidation/for.go,structs.go, andvalidation.go
Opening a giant 7-file PR that conflicts with both would only create merge friction for maintainers. Instead, we isolated the one major bottleneck nobody had touched yet: validation/rule/size.go.
Every time Rules() ran (including once per element in a 20-item slice), rule.Min, rule.Max, rule.Between, and rule.Size were eagerly allocating *big.Rat via reflect.ValueOf, formatting limit strings, allocating a map[string]string for error placeholders even on passing requests, and converting plain int64 / JSON integer values to *big.Rat.
In laravel/go-framework#421 (just 2 files: validation/rule/size.go and validation/rule/size_bench_test.go), we made *big.Rat and placeholder maps lazy, added a zero-allocation int64 / exact JSON float64 fast path, and added a bounded lock-free cache for small integer bounds (0..1024):
| Benchmark (Apple M4 Max) | Before (0.x) |
After (#421) |
Improvement |
|---|---|---|---|
BenchmarkSizeRulesConstruct |
687.2 ns/op · 2,128 B/op · 41 allocs |
99.7 ns/op · 288 B/op · 4 allocs |
6.9× faster · -90% allocs |
BenchmarkSizeRulesValidateInt |
25,404 ns/op · 54,264 B/op · 423 allocs |
11,345 ns/op · 22,984 B/op · 189 allocs |
2.2× faster · -55% allocs |
Best of all, it composes cleanly with #271 and #335 with zero conflicts.
2. Reading 100 Open PRs: Go Legends Are Already Showing Up
What surprised us most while browsing the PR list is who is contributing and how sharp the PRs already are — just days after the public beta dropped.
Surgical hot-path performance PRs
#331/#332/#333by@mattn— Seeing a well-known Go veteran drop three tiny, surgical PRs made us smile:#331: Cache maintenance modedownfile checks to at most once per second instead of hitting the filesystem on every request.#332(+3/-2): Build each middleware'snexthandler once instead of rebuilding closures per request.#333(+6/-4): Skip formatting the request log line completely when the log level is disabled.- These 3–6 line diffs touch every HTTP request and are textbook examples of easy-to-review, high-leverage PRs.
#339Ũ(ORM scan plan caching) — Cachingrows.Scantarget decisions and model row reflection per type. Once landed, Laravel Go's already-fast Heavy ORM benchmark will get another noticeable boost.#410(Coalesce concurrent cache misses) — Deduplicating concurrent cache misses (singleflight-style thundering herd protection) for traffic spikes.#383(Dirty tracking on models) — Saving only the columns actually modified on a model edit, bringing PHP Laravel's dirty tracking into Go.#321(Avoid copying unchanged query builder clauses) — Cutting unnecessary slice clones during query construction.
Ambitious Laravel ecosystem features already in flight
#312Blade templates with Go expressions (+8,434) ńWayfinder (+9,255) by@WendellAdriel— Massive community efforts porting Blade syntax and type-safe route generation.#380ŽNative OpenTelemetry (OTLP) HTTP metrics & log export by@ymotongpoo— Production-grade observability landing early from one of the Go/OTel community's leading voices.#373Global scopes on models (+1,437) — Crucial for multi-tenant SaaS and business apps.#424/#425/#426(RateLimited,ThrottlesExceptions,WithoutOverlapping) Ŵ(Unique jobs) — The core Laravel Queue middleware suite coming together rapidly.#350Transactional dispatch for database queues — Ensuring jobs dispatch only after the surrounding DB transaction commits.
Small PRs that reveal big direction
#378by@taylorotwell— Updating the installation guide for CLI Go auto-install, signaling how seriously the team is taking zero-friction onboarding for PHP developers trying Go for the first time.#309— Requiring Go1.27.1specifically for itsdatabase/sqldeadlock fix.
3. Why We Plan to Keep Contributing Daily
Browsing laravel/go-framework feels like watching early Laravel history happen again — except this time with Go's compiler, -race detector, pprof, and a mix of PHP/Laravel veterans and seasoned Go engineers collaborating in the same repo.
Our main takeaway from @mattn's PRs and our own #421: small, self-contained, well-benchmarked PRs with zero overlap are the best way to help a fast-moving framework without overloading maintainers. We plan to keep checking the repo daily, responding to reviews, and chipping away at real-world bottlenecks as we build with Laravel Go.