Conversation
The dev root layout called `liveSocket.enableLatencySim(750)` on every page. LiveView then delayed every client message by 750ms through `setTimeout`, so each interaction felt slow. Selecting a backend type renders in 0.5ms on the server, but took 750ms in the browser. `enableLatencySim` also turns on debug mode, which logs every event to the console. A developer who wants the simulator can still call `liveSocket.enableLatencySim(750)` from the console. Note: the setting persists in sessionStorage. Run `liveSocket.disableLatencySim()` once, or open a new tab, to clear an existing value. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015XJWSbFFxwiYB25iUAGmXc
This was referenced Sep 14, 2026
Contributor
Author
|
Closing for #3986 3986 |
chasers
added a commit
that referenced
this pull request
Sep 17, 2026
The dev root layout called `liveSocket.enableLatencySim(750)` on every page load. LiveView then held back every client message by 750ms, so every click and form change in dev waited 750ms. The server was never slow. This is the same change as #3901. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBPF1knvgfghTSdxuYryGL
chasers
added a commit
that referenced
this pull request
Sep 17, 2026
The dev root layout called `liveSocket.enableLatencySim(750)` on every page load. LiveView then held back every client message by 750ms, so every click and form change in dev waited 750ms. The server was never slow. This is the same change as #3901. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBPF1knvgfghTSdxuYryGL
chasers
added a commit
that referenced
this pull request
Sep 17, 2026
The dev root layout called `liveSocket.enableLatencySim(750)` on every page load. LiveView then held back every client message by 750ms, so every click and form change in dev waited 750ms. The server was never slow. This is the same change as #3901. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBPF1knvgfghTSdxuYryGL
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The dev root layout called
liveSocket.enableLatencySim(750)on every page load:LiveView then delayed every client message by 750ms:
So every click, every
phx-change, and every form submit paid 750ms in dev.Evidence
The server was never slow. Measured on this codebase:
change_form_typeserver renderSelecting a backend type renders in 0.5ms, then waits 750ms in the browser.
Side effect this also fixes
enableLatencySimcallsenableDebug()first, so dev also logged every LiveView event to the console.After merging
The value persists in
sessionStorage, so removing the script does not clear it. Run this once in the browser console:Opening a new tab also works.
A developer who wants the simulator can still call
liveSocket.enableLatencySim(750)from the console.🤖 Generated with Claude Code
https://claude.ai/code/session_015XJWSbFFxwiYB25iUAGmXc