Bug 1543776 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Ted Campbell [:tcampbell] from comment #3)

> Jon, it seems like when we fail OffThreadParsingMustWaitForGC(), we get queued until the end of GC in the parseWaitingOnGC queue. It seems though that we end up waiting on this queue until the major GC finishes, even if it is incremental and takes many seconds.

This is correct, but we also try not to parse off thread while this is happening.  See the comments here:

https://searchfox.org/mozilla-central/source/js/src/vm/OffThreadScriptCompilation.cpp#45

It's possible that the script in question is large enough that we decide to parse it off thread anyway.

The restriction in place happens because off thread parsing creates atoms so we don't allow it while collecting the atoms zone.  GCs that don't collect atoms are not affected.

I think it's possible to remove this restriction if we allow the main thread to pause off thread parsing and mark in-use atoms, but this is not trivial.

Another question to ask is why this incremental GC is running for so long.  Ideally incremental GCs would not take many seconds.
(In reply to Ted Campbell [:tcampbell] from comment #3)

> Jon, it seems like when we fail OffThreadParsingMustWaitForGC(), we get queued until the end of GC in the parseWaitingOnGC queue. It seems though that we end up waiting on this queue until the major GC finishes, even if it is incremental and takes many seconds.

This is correct, but we also try not to parse off thread while this is happening.  See the comments here:

https://searchfox.org/mozilla-central/source/js/src/vm/OffThreadScriptCompilation.cpp#45

It's possible that the script in question is large enough that we decide to parse it off thread anyway.

The restriction in place happens because off thread parsing creates atoms so it's not safe while collecting the atoms zone.  GCs that don't collect atoms are not affected.

I think it's possible to remove this restriction if we allow the main thread to pause off thread parsing and mark in-use atoms, but this is not trivial.

Another question to ask is why this incremental GC is running for so long.  Ideally incremental GCs would not take many seconds.

Back to Bug 1543776 Comment 7