Closed
Bug 1223420
Opened 9 years ago
Closed 9 years ago
Avoid creating intermediate array in DataAdapter update functions for history and bookmarks
Categories
(Firefox OS Graveyard :: Sync, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mbdejong, Unassigned)
Details
Attachments
(1 file)
The current DataAdapters for history and bookmarks have an update function which calls an _update function which loops over the Kinto collection to fill an array. This array is then passed to HistoryHelper.updatePlaces or BookmarksHelper.updateBookmarks, and is looped over a second time in order to make the necessary changes in the DataStore for each record. Creating this array and then looping over essentially the same records a second time is probably not very memory-efficient (and probably also not so time-efficient).
Comment 1•9 years ago
|
||
Reporter | ||
Updated•9 years ago
|
Attachment #8686088 -
Flags: review?(ferjmoreno)
Attachment #8686088 -
Flags: feedback?(selee)
Updated•9 years ago
|
Attachment #8686088 -
Flags: review?(ferjmoreno) → review?(selee)
Comment 2•9 years ago
|
||
Comment on attachment 8686088 [details] [review] [gaia] michielbdejong:1223420-avoid-intermediate-array > mozilla-b2g:master Hi Michiel, Could you rebase the patch to master branch? That would be easier to review and test your patch. Thank you! :)
Attachment #8686088 -
Flags: review?(selee)
Attachment #8686088 -
Flags: review-
Attachment #8686088 -
Flags: feedback?(selee)
Reporter | ||
Updated•9 years ago
|
Attachment #8686088 -
Flags: review- → review?(selee)
Comment 4•9 years ago
|
||
Comment on attachment 8686088 [details] [review] [gaia] michielbdejong:1223420-avoid-intermediate-array > mozilla-b2g:master Hi Michiel, Thanks for doing this refactor and LGTM :) I leave one minor question about the test context.
Flags: needinfo?(selee)
Attachment #8686088 -
Flags: review?(selee) → review+
Comment 6•9 years ago
|
||
landed on master: https://github.com/mozilla-b2g/gaia/commit/e854b36d51c28abac92c76bf4a322bd49c480fa5 gaia-test: https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=8f00d8ed868452163990061200af0c6f3681c8dd
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(selee)
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•