Last Comment Bug 782315 - GC: Cut out unnecessary work when not collecting atoms
: GC: Cut out unnecessary work when not collecting atoms
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: All Mac OS X
-- minor (vote)
: mozilla17
Assigned To: Jon Coppeard (:jonco)
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2012-08-13 09:58 PDT by Jon Coppeard (:jonco)
Modified: 2012-08-14 17:52 PDT (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Proposed fix (5.76 KB, text/plain)
2012-08-13 09:58 PDT, Jon Coppeard (:jonco)
no flags Details
Proposed fix (5.93 KB, patch)
2012-08-13 09:59 PDT, Jon Coppeard (:jonco)
wmccloskey: review+
Details | Diff | Splinter Review

Description User image Jon Coppeard (:jonco) 2012-08-13 09:58:30 PDT
Created attachment 651429 [details]
Proposed fix

At the moment, if atoms are not being collected then every atom is marked in the mark phase so that no atoms will be collected in sweep phase.  It's more efficient to neither mark nor sweep the atoms in this case.

Also, we can simplify things by setting the collecting flag of the atoms compartment to record whether atoms are being swept at the start of collection.
Comment 1 User image Jon Coppeard (:jonco) 2012-08-13 09:59:52 PDT
Created attachment 651432 [details] [diff] [review]
Proposed fix
Comment 2 User image Bill McCloskey (:billm) 2012-08-13 16:27:41 PDT
Comment on attachment 651432 [details] [diff] [review]
Proposed fix

Review of attachment 651432 [details] [diff] [review]:

::: js/src/jsgc.cpp
@@ +3507,1 @@
>      {

Brace should be on the same line as the if.
Comment 4 User image Ryan VanderMeulen [:RyanVM] 2012-08-14 17:52:50 PDT

Note You need to log in before you can comment on or make changes to this bug.