Closed Bug 422490 Opened 16 years ago Closed 16 years ago

Throbber keeps spinning when typing in a new url (AwesomeBar keeps searching when there's no results)

Categories

(Firefox :: Address Bar, defect, P2)

defect

Tracking

()

VERIFIED FIXED
Firefox 3 beta5

People

(Reporter: Mardak, Assigned: Mardak)

References

Details

(Keywords: perf)

Attachments

(1 file, 3 obsolete files)

 
Flags: blocking-firefox3?
Keywords: perf
Whoops.. totally forgot about the comments :p

If the user is typing out a new url or perhaps a data uri or something.. the autocomplete will keep trying to find pages through the WHOLE history even though it won't find anything.. especially when the user keeps adding more words.

We can optimize this by not doing the search if the previous search finished and found nothing.
Blocks: 422491
This patch is on top of bug 395161 and bug 392143.. so while not true dependencies.. I'll need to unbitrot to not need them (the context) :(.
Depends on: 392143, 395161
Attached patch v1 (obsolete) — Splinter Review
You probably won't be able to apply the patch without grabbing the other ones first.
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #308942 - Flags: review?(dietrich)
Attached patch v1.1 (obsolete) — Splinter Review
Forgot to check for javascript: URIs. Yay unit tests ;)
Attachment #308942 - Attachment is obsolete: true
Attachment #309028 - Flags: review?(dietrich)
Attachment #308942 - Flags: review?(dietrich)
Another human performance thing, which will affect perception of browser speed.
Flags: blocking-firefox3? → blocking-firefox3+
Priority: -- → P2
Attached patch v1.2 (obsolete) — Splinter Review
Unbitrot from moving the patch to the top of my stack as this is the most-blocking patch I have for dietrich right now.
Attachment #309028 - Attachment is obsolete: true
Attachment #309178 - Flags: review?(dietrich)
Attachment #309028 - Flags: review?(dietrich)
No longer depends on: 392143, 395161
Comment on attachment 309178 [details] [diff] [review]
v1.2

>+  if (mAutoCompleteFinishedSearch &&
>+    prevMatchCount < (PRUint32)mAutoCompleteMaxResults &&
>+    !prevSearchString.IsEmpty() && Substring(mCurrentSearchString, 0,
>+      prevSearchString.Length()).Equals(prevSearchString) &&
>+    (StartsWithJS(prevSearchString) == StartsWithJS(mCurrentSearchString))) {

please line up conditions with the first, and put the substring all on one line for readability.

r=me, thanks!
Attachment #309178 - Flags: review?(dietrich) → review+
Attached patch v1.3Splinter Review
(In reply to comment #7)
> >+  if (mAutoCompleteFinishedSearch &&
> >+    prevMatchCount < (PRUint32)mAutoCompleteMaxResults &&
> >+    !prevSearchString.IsEmpty() && Substring(mCurrentSearchString, 0,
> >+      prevSearchString.Length()).Equals(prevSearchString) &&
> >+    (StartsWithJS(prevSearchString) == StartsWithJS(mCurrentSearchString))) {
> please line up conditions with the first, and put the substring all on one line
> for readability.
Lined up and.. got rid of the Substring and replaced with StringBeginsWith(mCurrentSearchString, prevSearchString)
Attachment #309178 - Attachment is obsolete: true
Checking in toolkit/components/places/src/nsNavHistory.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.cpp,v  <--  nsNavHistory.cpp
new revision: 1.272; previous revision: 1.271
done
Checking in toolkit/components/places/src/nsNavHistory.h;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.h,v  <--  nsNavHistory.h
new revision: 1.148; previous revision: 1.147
done
Checking in toolkit/components/places/src/nsNavHistoryAutoComplete.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistoryAutoComplete.cpp,v  <--  nsNavHistoryAutoComplete.cpp
new revision: 1.48; previous revision: 1.47
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-litmus?
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 beta5
Blocks: 422177
VERIFIED Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008051202 Firefox/3.0
Status: RESOLVED → VERIFIED
added test cases https://litmus.mozilla.org/show_test.cgi?id=9468 to litmus
Flags: in-litmus? → in-litmus+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: