This hits every for-in loop, and is horribly slow. This should be per-thread.
ok = rt->gcIteratorTable.append(obj);
iirc this is because workers can migrate from thread to thread. ack!
When that happens, they can move their iterators into an expensive runtime thing and flag them so that we remove from the expensive runtime thing later.
(Are threads really that expensive that we can't have one per worker? I guess it's a lot of non-pageable memory on some systems.)
I think we can get rid of this table altogether with some work on iteration. Don't panic!
(In reply to comment #1)
> iirc this is because workers can migrate from thread to thread. ack!
Yes, this is indeed the case. I should have filed a bug to support migration of JSThread to another native thread long time ago. But it is better late than never, bug 554866.
Okay this function was removed, but not the definition in jsgc.h oO
Created attachment 576822 [details] [diff] [review]
Comment on attachment 576822 [details] [diff] [review]
I bet nobody will mind... rs=me