Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Page Speed Laravel Package

vinkius-labs/laravel-page-speed

Laravel Page Speed is an end-to-end optimization pipeline for Blade-rendered pages and REST APIs, with composable middleware, measurable latency and bandwidth gains, store-agnostic caching, and built-in observability and resilience for Laravel 10–13.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for performance optimization: This package covers a mature, well-understood problem space (HTML minification, compression, response caching, security headers, circuit breaking, health checks) that most teams would otherwise build ad hoc. Adopting it lets engineering spend cycles on product differentiation rather than re-implementing known optimization patterns.
  • Roadmap for performance and reliability initiatives: If your roadmap includes Core Web Vitals, page load targets, API latency SLAs, bandwidth cost reduction, or resilience work (circuit breakers, health checks), this package provides an implementation layer that can be enabled incrementally without a dedicated project.
  • Feature-level decisions on caching and latency: The API response cache with method-aware invalidation and dynamic tagging directly informs decisions about where caching belongs (middleware vs. application logic) and how much infrastructure (Redis vs. file) is justified by expected hit rates.
  • Observability investment: Built-in performance headers (X-Response-Time, X-Cache-Status, X-Circuit-Breaker-State) support decisions about consolidating on Datadog/New Relic/Prometheus without custom instrumentation work.
  • Use cases: marketing/content sites with Blade rendering; high-traffic REST APIs (the README's reference scenario is 1M requests/day, 65% cache hit rate); cost-reduction initiatives around egress and compute; pre-hardening security headers ahead of audits; Kubernetes readiness/liveness probes via the health check middleware.
  • Trade-offs to weigh: optimization results depend heavily on traffic profile and cache hit rate; aggressive HTML rewriting (comment stripping, whitespace collapse, script deferral) carries edge-case risk with client-side frameworks, so scope and testing are product decisions, not just engineering ones.

When to Consider This Package

Consider adoption when:

  • You run Laravel 10–13 and want a low-integration-cost performance baseline without rewriting application code.
  • Your architecture can absorb middleware-level optimization — i.e., you control the HTTP layer and aren't behind a CDN or edge platform that already handles compression, caching, and header hardening.
  • You have measurable performance targets (latency, payload size, bandwidth spend) and the team can commit to instrumenting and validating gains. The README's headline metrics are illustrative of a specific scenario, not a guarantee.
  • You need resilience primitives (circuit breaker, health checks) but not enough to justify a standalone service.
  • You can isolate the risk: enable middleware selectively in staging, monitor X-Performance-Warning and error rates, and roll out per route group.

Look elsewhere when:

  • Your optimization needs are already served at the infrastructure layer (CDN, reverse proxy, API gateway, service mesh) — duplicating compression and caching logic risks confusing behavior and double-caching.
  • You have highly dynamic, per-user, non-cacheable API responses where the caching middleware adds overhead with little benefit.
  • You run a heavily client-side application (Livewire/Alpine-heavy SPAs) and cannot tolerate any HTML rewriting edge cases — though the changelog shows active hardening for these frameworks, the blast radius of a minification bug on a revenue page is a real concern.
  • You require vendor-backed support, SLAs, or an enterprise maintenance contract — this is MIT-licensed with a Discord community and a single-maintainer profile.
  • The dependency count and Laravel-version coupling (10–13) create upgrade friction you can't absorb, or your team prefers first-party framework features and minimal third-party middleware.

How to Pitch It (Stakeholders)

For executives: This is an open-source, MIT-licensed performance layer for our Laravel applications. It's a low-cost, low-risk way to pursue measurable outcomes we already care about — faster page loads, smaller API payloads, lower bandwidth bills, and better resilience under load. The published reference scenario shows substantial reductions in page size, API payload, and latency under cache hits, though actual results will depend on our traffic and cache hit rate. Integration is configuration-only, applied incrementally, and reversible. Recommendation: pilot on one API and one content surface, measure with the built-in observability headers, and decide on broader rollout from data.

For engineering: It's a middleware pipeline, not a framework change. Enable only what you need via config/laravel-page-speed.php, registered in the web and/or api groups. It's store-agnostic (Redis, Memcached, DynamoDB, file, array), supports cache tags and method-aware invalidation, and ships circuit breaking, health checks, ETag, Brotli/Gzip compression, and security headers. It emits standard performance headers for our existing APM. The project is actively maintained with recent hardening for Octane/Swoole state leaks, Livewire/Alpine attribute preservation, and a Content-Type guard preventing non-HTML corruption. Risks to manage: regex-based HTML rewriting on edge-case markup, cache invalidation correctness, and single-maintainer dependency — mitigate with staged rollout, skip patterns for diagnostics routes, and integration tests around our most critical templates and endpoints.

Ask: Approve a time-boxed pilot (one sprint, one service) with success criteria defined upfront — a target improvement in p95 latency or payload size, no increase in error rate, and a documented rollback path.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
thuraaung2493/laravel-rulecraft
cyberwizard/schedule-catchup
livetennisapi/livetennisapi-laravel
roundly-consulting/notifications-for-laravel
flightsadmin/bootstrap-starter-kit
lasserafn/laravel-intempus
likyly/sdk
tdt/input
coreation/php-shapefile
coreation/gisconverter
primix/widgets
primix/notifications
primix/actions
primix/tables
primix/details
primix/forms
primix/support
marcelgwerder/laravel-api-handler
firebrikdotcom/conveyor-laravel-broadcaster
kanata-php/conveyor-laravel-broadcaster