summaryrefslogtreecommitdiffstats
path: root/build/gyp_chromium
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 01:07:01 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-22 01:15:04 +0000
commit96609afb1b63c6f3be8564bbe7b9fe2c1eb4550b (patch)
treec157f66410b3518fc6d2e9e558102d69fed71f91 /build/gyp_chromium
parent24d30aba1f440ab63820e30ad9206ea9032d0c29 (diff)
downloadchromium_src-96609afb1b63c6f3be8564bbe7b9fe2c1eb4550b.zip
chromium_src-96609afb1b63c6f3be8564bbe7b9fe2c1eb4550b.tar.gz
chromium_src-96609afb1b63c6f3be8564bbe7b9fe2c1eb4550b.tar.bz2
Disable garbage collection for gyp_chromium.
Python always does reference counting and that handles most of the objects used by GYP. The GC is used to detect and drop circular references. If GC is turned off then the heap scanning can be skipped to save some CPU cycles, and the memory leaked due to circular references isn't noticeable. This saves about 1 second out of 16 on Linux in a Z620 workstation. BUG=None Review URL: https://codereview.chromium.org/495993002 Cr-Commit-Position: refs/heads/master@{#291287} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291287 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/gyp_chromium')
-rwxr-xr-xbuild/gyp_chromium7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/gyp_chromium b/build/gyp_chromium
index f87761d..b8fe82d 100755
--- a/build/gyp_chromium
+++ b/build/gyp_chromium
@@ -188,6 +188,13 @@ def additional_include_files(supplemental_files, args=[]):
if __name__ == '__main__':
+ # Disabling garbage collection saves about 1 second out of 16 on a Linux
+ # z620 workstation. Since this is a short-lived process it's not a problem to
+ # leak a few cyclyc references in order to spare the CPU cycles for
+ # scanning the heap.
+ import gc
+ gc.disable()
+
args = sys.argv[1:]
use_analyzer = len(args) and args[0] == '--analyzer'