Servo sidecar: extend post-input frame wait to 250 ms
The live-mode `poll_frame` budgeted 60 ms for Servo to paint after each `Ensure` request. That value was set when the only thing being applied was navigation, where the GPUI tick timer (16 ms cadence) would backfill missed frames quickly. Once we started forwarding clicks and typing through the same `Ensure`, 60 ms was tighter than the software renderer needs to handle MouseDown + MouseUp + layout + paint on a real page like google.com — so the response carried the pre-click frame and the user saw no visible reaction. Bump the budget to 250 ms. That covers the click → focus-ring paint cycle on the software backend without making nav slower (`apply_layout` exits early on stable size, so unchanged ensures still return on the first poll).
This commit is contained in:
@@ -18,7 +18,14 @@ use thiserror::Error;
|
||||
|
||||
use super::args::LiveArgs;
|
||||
|
||||
const LIVE_FRAME_WAIT_TIMEOUT: Duration = Duration::from_millis(60);
|
||||
/// Per-`Ensure` budget the sidecar waits for Servo to paint a frame
|
||||
/// after input dispatch. The original 60 ms was tuned for navigation
|
||||
/// alone — too tight for click + paint round trips on the software
|
||||
/// renderer. With 250 ms, a click dispatched into an already-loaded
|
||||
/// page (the common case for input dispatch) paints within the same
|
||||
/// `Ensure` so the user sees the page react instead of waiting for
|
||||
/// the next 16 ms `Poll` from the GPUI shell.
|
||||
const LIVE_FRAME_WAIT_TIMEOUT: Duration = Duration::from_millis(250);
|
||||
const LIVE_FRAME_WAIT_INTERVAL: Duration = Duration::from_millis(2);
|
||||
|
||||
pub(super) fn run_live(args: LiveArgs) -> Result<(), LiveSidecarError> {
|
||||
|
||||
Reference in New Issue
Block a user