Closed Bug 892155 Opened 11 years ago Closed 11 years ago

contacts app could further delay order/search calculations

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

(Keywords: perf, Whiteboard: [c= p=1 s=2013.07.12])

Attachments

(1 file)

When the visibility_monitor was implemented I added a partial delay of the calculation of the order and search strings.  These are somewhat expensive due to the normalization that must occur.  Right now the calculation will happen when the element appears on screen or when the value is needed for searching/ordering.

There is no reason to force these calculations when the list elements appear on screen.  Deferring this logic should help make scrolling smoother and slightly speed up load (due to forced rendering of above the fold elements).
Attachment #773630 - Attachment mime type: text/plain → text/html
Only one thing although I guess that you have taken in account it correctly, are you loading all info for searching when an user enters in search mode? Right now, I don't know when the info from Facebook is loaded but it is needed for the search (company, telephones, ...)

Thanks
Hi,

as Cristian commented we will need to wait till Facebook information is fully loaded to be able to search all the contacts.

Which leads me to the idea of, deferring/enabling the search once we receive the |onListRendered| (waiting also for the FB info to be loaded). Cristian please correct me if I'm wrong but we used to do this isnt?

Thanks!
F.
The search string is calculated when search.js calls 'getSearchText()' for each node.  If this happens prior to the FB load, then it may not get the correct information.  Let me investigate as I was not aware of this concern.

One possible fix would be to clear the search string on FB load so that it gets recalculated the next time the user searches.
After talking to Cristian on irc it appears the FB search problem may be a separate, bigger issue.  I wrote up bug 892461 to track it.

If possible I'd like to proceed with the deferring the search string calculation.  It maintains the current level of functionality and, if anything, should make it easier to fix bug 892461.

Does that sound reasonable Francisco?
Flags: needinfo?(francisco.jordano)
Taking into account the FB attribute search is currently broken, we can land this and follow up with bug 892461 as you comment.

Thanks a lot Ben!
Flags: needinfo?(francisco.jordano)
Attachment #773630 - Flags: review?(francisco.jordano) → review+
Thanks Francisco.  Merged:

  https://github.com/mozilla-b2g/gaia/commit/4f4fa7b94913bbe7550bfe434a1145d982812248
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Keywords: perf
Whiteboard: [ c= p=1 ] → [c= p=1 s=2013.07.12]
Blocks: 865747
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: