Closed Bug 1246448 Opened 9 years ago Closed 6 years ago

Re-filter login search results in memory

Categories

(Firefox for iOS :: General, defect)

All
iOS
defect
Not set
normal

Tracking

()

RESOLVED INACTIVE
Tracking Status
fxios + ---

People

(Reporter: rnewman, Assigned: maurya1985)

References

Details

(Keywords: perf, Whiteboard: [good next bug][lang=swift][PasswordManager])

Attachments

(1 file)

When you type "github" in the login search bar, we issue six queries to the DB (perhaps even seven!):

""        << Pretty sure this happens and is a bug.
"g"
"gi"
…

There's no need for this: all results matching "gi" will also match "g". Given the resulting array of Login instances from the search for "g", we can just filter the list in memory.

The astute observer will note that after the initial list of all logins is loaded, _all_ searches can be done in memory.

Hitting backspace can be handled by re-querying, or by caching the array of results at each stage.

So here are my suggestions:

* Cancel/ignore in-flight queries when a new search is issued. Primarily this affects the initial fetch of all logins.

* Filter results in memory if the previous entered search term is a prefix of the new term.
Assignee: nobody → maurya1985
Status: NEW → ASSIGNED
review ping
Comment on attachment 8848036 [details] [review]
Link to Github pull-request: https://github.com/mozilla-mobile/firefox-ios/pull/2526

Sorry for the delay; I was traveling internationally yesterday and was unavailable on Friday.
Attachment #8848036 - Flags: review?(rnewman) → feedback+
Richard, is the following expected behavior? For testing this change, I'm using logins from my account.

When I install from Xcode, I get signed out of Sync after every closing of the app. So, I'm having to log into Sync just to get my logins. Sometimes, relogging into Sync goes fine, but it fails to get the logins. This is annoying as I have to uninstall and reinstall and then log into sync, go to my mail to confirm sign-in, etc.

On the release version (currently 6.1) and the Beta, I don't get logged out of Sync even after terminating the app. So, I always have my logins.
Flags: needinfo?(rnewman)
(In reply to Maurya Talisetti from comment #4)
> Richard, is the following expected behavior?

That doesn't sound expected to me. Reminds me of Bug 1344608. Are you rebased on top of `master`?
Flags: needinfo?(rnewman)
Whiteboard: [good next bug][lang=swift] → [good next bug][lang=swift][PasswordManager]
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: