Open Bug 1532039 Opened 8 months ago Updated 6 months ago

The switch to search bar is too slow


(Firefox :: Search, defect, P3)

65 Branch





(Reporter: kukadlo, Unassigned, NeedInfo)


User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0

Steps to reproduce:

I have separate address bar and search bar in the toolbar.

I left-mouse click into the search bar, preparing to edit the content of it, and hit Ctrl+A to select the whole old search phrase.

Actual results:

The currently viewed web pages gets selected instead.

It takes about 150-300ms to firefox to finally switch the cursor into the search bar after the click, while I usually hit the Ctrl+A within 100ms after click (I'm just used to snappy fast UI, I'm not even trying to be fast, if I would try to be fast, I would be probably in 30-80ms range).

Expected results:

The search bar should catch Ctrl+A lot more sooner after the click (ideally within 10ms on 3+ GHz CPU).

Also it's not Ctrl+A related, even the ordinary typing does catch up slowly, sometimes when I have the search bar empty, I start typing the search phrase immediately after clicking the search bar, and instead of entering search phrase, I end up editing the form in the current web.

Component: Untriaged → Search
Component: Search → Toolbars and Customization

Based on comment #0 this is specific to the search bar (ie I assume the same thing doesn't happen in the location bar). Dale, why did you move this?

Reporter: can you use the profiler ( ) to share a profile link of what happens when you click in the search bar?

Component: Toolbars and Customization → Search
Flags: needinfo?(kukadlo)
Flags: needinfo?(dharvey)

Sorry new to triage here, I thought the Search component mostly refererred to the backend / SearchService and the UI would come under toolbars, please move the stuff back if I get it wrong and will figure out where the boundary is, cheers

Flags: needinfo?(dharvey)
Priority: -- → P3

Will try to also collect and add profiler data, but while checking it more thoroughly, I have find something.

I use notebook with touchpad and when I use touchpad "click", it of course takes some delay before the whole click action is detected (simple touch can be also start of cursor movement, so it's after losing touch and some debounce delay the click event is produced by the touchpad driver). Don't know how to measure it precisely, but by a feel I would say it takes somewhere between 40-80ms, sometimes slightly over 100ms.

So part of the delay is in the touchpad driver, and it may be in extreme cases the "Ctrl+A" from keyboard comes maybe even milliseconds before the click-event, not sure about that, hopefully you can tell from the profiler data such nuances (whether the action at least came in the correct order).

Still I can recall the firefox is somehow more prone to demonstrate this, like there's sometimes extra 50ms before the bar is active.. or maybe I rarely use this kind of combination of actions in other SW.

address bar vs search bar - hard to tell, it feels like there actually is some difference, like +20-30ms on the search bar, but it's varying a lot (after initial click into both they seem to act quite identically, but the first click after some time of just browsing is sometimes slightly slower).

You need to log in before you can comment on or make changes to this bug.