Nuking CCWs can result in quadratic weakmap behavior
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
People
(Reporter: sfink, Unassigned, NeedInfo)
References
Details
Attachments
(1 obsolete file)
The fix for the iterator invalidation problem in bug 1556430 can result in quadratic behavior because it keeps starting over processing the list of WeakMarkables in severWeakDelegate.
Because the list itself is not modified during processing, only the gcWeakKeys table, the simple fix is to restart iteration where we last left off.
Unfortunately, it still has to re-lookup the list for every processed element, but at least that doesn't change the O(n).
Note that the length of the list is determined by the number of distinct weakmaps with a key in common. So it's user-controlled how long the list is and therefore the n in O(n^2), which is unfortunate.
Reporter | ||
Comment 1•5 years ago
|
||
Comment 2•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:sfink, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Updated•2 years ago
|
Description
•