Personal Growth

Speed Up Livewire Forms, Modals, and Lists with Fewer Requests, Targeted Updates, and Smaller Payloads

by Rakesh kumar · updated 10/13/2026

Prompt

Make Livewire Pages Faster with Fewer Server Requests
Open Modals Instantly and Reduce Input Requests
Update Single Rows and Avoid Full List Reloads
Reduce Livewire Payloads and Repeated Header Calls
Speed Up Forms, Modals, and Lists
==========Prompt==========================================
Act as a senior Laravel, Livewire, and Alpine.js performance engineer. Audit only Livewire performance in HolidayLandmark: modal interactions, input updates, NavbarComposer execution, list reloads after saving, and large public properties.

Enter Plan Mode first. Begin with read-only inspection. Do not change code or configuration until I review and explicitly approve your proposed approach.

Read the project’s AGENTS.md and CLAUDE.md. Verify the installed Laravel, Livewire, and Alpine.js versions before recommending changes.

Inspect these five areas separately:

1. **Open and close modals with Alpine**
   - Find modals and drawers that make server requests only to show or hide themselves.
   - Propose Alpine handling for simple visibility changes.
   - Keep server calls when opening requires fresh data, authorization, or other necessary work.
   - Preserve form reset behavior, validation messages, keyboard controls, focus handling, and accessibility.

2. **Reduce input-triggered requests**
   - Find `wire:model.live` inputs that send unnecessary requests while users type.
   - Recommend version-compatible deferred `wire:model`, `.blur`, or debounced updates according to the field’s purpose.
   - Preserve live search, dependent dropdowns, calculations, validation, and correct values on submission.
   - Explain when each input should send its value to the server.

3. **Scope NavbarComposer to the header**
   - Inspect its registration, matched views, execution count, and upstream calls.
   - Propose running it only for the header views that need its data.
   - Check whether the header renders more than once and whether request-scoped reuse is needed.
   - Preserve navigation, authentication state, permissions, and notification counts.

4. **Update affected rows after saving**
   - Find actions that reload the full list after creating, updating, deleting, or changing one record.
   - Propose updating or removing the affected row using the confirmed server response where safe.
   - Preserve filters, sorting, pagination, totals, and related data.
   - Keep a focused reload where the response lacks required data or the action changes list membership or ordering.
   - Preserve stable row keys and existing failure behavior.

5. **Reduce large public properties**
   - Find large public arrays included in Livewire request and response payloads.
   - Identify unused fields, duplicate data, and lists that grow without limits.
   - Recommend storing only required state, using pagination, or loading display data through version-compatible computed properties where suitable.
   - Keep sensitive data out of browser-visible state.
   - Preserve selected records, form values, validation, and component behavior. Measure whether smaller payloads introduce extra API or database calls.

For every finding, show:

- Affected page and user action.
- Exact file paths and current line numbers.
- Existing code snippet.
- Current server request count, API calls, and payload size where measurable.
- Why the current behavior adds delay or unnecessary work.
- Whether the issue is confirmed or needs measurement.
- Clearly labelled proposed before/after code—do not apply it.
- Risks, focused validation, and rollback steps.

Compare modal response time, requests while typing, composer execution count, API calls after saving, Livewire payload size, and overall action response time under consistent conditions. Do not invent improvement percentages.

Finish with a prioritized implementation plan in simple words. Stop and wait for my approval.

After approval, implement only the agreed changes, preserve existing functionality, avoid unrelated refactoring, and report changed files, validation results, and measured improvements.
Sign in to fork