Closed
Bug 730057
Opened 13 years ago
Closed 13 years ago
drawer-state branch: Thumbnail Jobs being launched 2x?
Categories
(Pancake Graveyard :: Front-end, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
M2
People
(Reporter: gbrander, Assigned: gbrander)
Details
(Keywords: regression)
Originally reported by sfoster.
Assignee | ||
Comment 1•13 years ago
|
||
`SiteCollection.prototype.parse` is getting hit twice. `ThumbnailJobCollection` is getting instantiated only once per ID, and polled properly after that -- so de-duping is working.
We know that this double-parse is happening both in `HomeController` and `SearchController` -- both of which use `SiteListView` -- so maybe it's associated with that?
It doesn't look like fetch is called in either `ListView` or `SiteListView`. `RouteController` isn't calling fetch on `this.sites` either.
`SitesCollection.prototype.fetch` is called in the enter method of the controller.
Maybe `enter` is being called twice? Look for this `console.log("Home/main state entry");`. -- nope, just once.
Assignee | ||
Comment 2•13 years ago
|
||
Perhaps `LiveCollection.prototype.fetch` calls `parse` twice?
Yup. When `LiveCollection.prototype.fetch` is called with the `diff` argument, it `parse`s in the `prune` method before delegating to `Backbone.Collection.fetch`, which also calls `parse`. This results in 2x parse calls -- but parse should be safe to call as many times as you like. Not a bug.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Assignee | ||
Updated•13 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 3•13 years ago
|
||
I found more bugs related to this. As each SiteCollection instance has its own thumbnailJobs lookup, if the same site was a part of 2 collections, we'd get 2 job instances and redundant polling. Making this lookup "global" by making it a static property of the ThumbnailJobCollection class seems to have helped greatly
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•