Closed Bug 1239436 Opened 8 years ago Closed 8 years ago

Remove in-place mutation of trees' expanded sets in reducers

Categories

(DevTools :: Memory, defect, P2)

defect

Tracking

(firefox48 fixed)

RESOLVED FIXED
Firefox 48
Tracking Status
firefox48 --- fixed

People

(Reporter: fitzgen, Assigned: linclark)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We might be able to just get away with replacing the Set with a flat array and doing the O(n) lookup time. The expanded sets are probably pretty small, all things considered.

We could also generate a fresh Set for each state reduction. Still O(n), but then we aren't doing an additional O(n) search for each lookup.

Finally, we could either implement or grab an existing persistent immutable set.
Has STR: --- → irrelevant
Assignee: nobody → lclark
This patch replaces the mutable sets with Immutable.js sets. You'll need to apply the patch in 1253784 first.

Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f87d7721084e
Attachment #8731399 - Flags: review?(nfitzgerald)
Depends on: 1253784
See Also: → 1253376
Comment on attachment 8731399 [details] [diff] [review]
Bug1239436-immutable-set.patch --- Depends on 1253784

Review of attachment 8731399 [details] [diff] [review]:
-----------------------------------------------------------------

Excellent!!!

Thank you, Lin!
Attachment #8731399 - Flags: review?(nfitzgerald) → review+
You're welcome :)
Keywords: checkin-needed
Shoot, forgot blocker
Keywords: checkin-needed
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/e2280b84527f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.