Closed
Bug 936202
Opened 11 years ago
Closed 11 years ago
adding a contact triggers a list sync reflow due to imgLoader.reload()
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bkelly, Assigned: bkelly)
References
Details
(Keywords: perf, Whiteboard: [c=progress p=1 s= u=])
Attachments
(1 file)
Currently, when a contact is added or modified we end up calling imgLoader.reload() in addToList(). This is an issue for two reasons: 1) The call to imgLoader.reload() triggers a sync reflow on the list. 2) This gets called once for each contact added during a large import. To avoid this situation we can defer the imgLoader.reload() until the visibility monitor detects a change that effects our current onscreen view. Since the visibility monitor is smart enough to ignore contacts added below the current screen, this avoids a lot of sync reflows. (We might want to open another bug to replace imgLoader altogether in favor of performing the logic from visibility monitor.)
Assignee | ||
Comment 1•11 years ago
|
||
Jose, this pull request avoids a large number of sync reflows during the import process. It does this by deferring the imgLoader.reload() call until the visibility monitor confirms that our onscreen view has been modified.
Attachment #828902 -
Flags: review?(jmcf)
Assignee | ||
Comment 2•11 years ago
|
||
Note, this also includes not calling FixedHeader.refresh() in addToList(). This call is not needed here because the header is refreshed in showGroupByList(). This also helps with imports since performing the query selector on large DOM lists for each contact can get slow.
Updated•11 years ago
|
Attachment #828902 -
Flags: review?(jmcf) → review+
Comment 3•11 years ago
|
||
Please, nom it to 1.3 if you consider it thanks
Assignee | ||
Comment 4•11 years ago
|
||
Thanks for the review. Travis is green except for an unrelated marionette failure in media playback. Landed: https://github.com/mozilla-b2g/gaia/commit/dcdf1c525be784eb506ab06c523f5b0ef9b461d6 Jose, since master is 1.3, what does nom'ing for 1.3? do right now?
Assignee | ||
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•