Categories
Mozilla

Swing and a Miss

When we landed the asynchronous location bar, some people started to see substantially slower results. This was alarming since it was supposed to end up speeding or staying the same for everyone. After some investigation, we realized that the AutoComplete code was doing something very dumb with asynchronous searches. The problem was that the code would not actually handle the user pressing the enter key until the next set of results came in. Not only did this result in slower processing of the user’s selection, it also meant that weird race conditions would come up such as up opening a new tab, pasting a url in, press enter, and then switch tabs resulting in the reloading of the page that was just switched to. In other words, epic fail all around.

Luckily, the fix was trivial. Now we handle the enter keypress immediately when the user hits it, and not later. Problem solved :)

By Shawn Wilsher

The man behind the site.

4 replies on “Swing and a Miss”

I think I’ve seen those “weird race conditions” in 3.7a1pre nightlies. I would paste a URL or choose something from awesomebar results using arrow keys and the [Enter] key, go to another tab, and upon returning to the first tab find an unexpected URL, or that the URL wasn’t loaded. My brain is way ahead of the loading so I couldn’t figure out what I was doing wrong.

When you say “We landed”, “now we do X” and “problem solved”, it would help to indicate which tree(s) have the problem and the fix. Was this fixed August 27th for nightly FF builds?

Thanks for all you do.

Woo! I certainly haven’t hit that bug since it was fixed. Pressing enter does what I expect it to. Whether the async changes have made a difference or not I haven’t noticed though, searching never really seemed to lock up the browser for me anyway.

@skierpage
It is fixed in mozilla-central nightlies and will be fixed for 3.6 beta 1 (it landed on that branch yesterday).

@XtC4UaLL
Sadly, you are the only report I’ve seen like that. I’m not really sure what’s up, and it’s really hard to debug without being able to reproduce it. I want to look into it more next week though.

Comments are closed.