speed up scons I did some profiling and found that we spend a lot of time in SCons/Subst.py resolving paths with $ vars in them.  By pre-resolving some common $ vars, we can get a 16% speed up of an empty build (running hammer Hammer when everything is already built).  On my work desktop, this is a saving from ~180s to do an empty build to ~150s to do an empty build.
speed up scons
I did some profiling and found that we spend a lot of
time in SCons/Subst.py resolving paths with $ vars in
them.  By pre-resolving some common $ vars, we can get
a 16% speed up of an empty build (running hammer Hammer
when everything is already built).  On my work desktop,
this is a saving from ~180s to do an empty build to
~150s to do an empty build.

I found which symbols to pre-resolve by gathering stats
on what symbols were resolved during a single run.
Originally, these were the top 10 calls to
StringSubber.substitute:

  91466 /src/gclient-git/src/chrome
  89457 $MAIN_DIR/Hammer
  89457 $DESTINATION_ROOT
  89447 $TARGET_ROOT/obj
  65514 $OBJ_ROOT/webkit
  18169 $OBJ_ROOT/third_party
   8991 -I/src/gclient-git/src/webkit/pending
   5700 $THIRD_PARTY_DIR/WebKit
   4488 -I/src/gclient-git/src/webkit/port/platform/network
   4488 -I/src/gclient-git/src/webkit/port/platform

Afterwards, the top 10 calls were:
  65514 /src/gclient-git/src/chrome/Hammer/obj/webkit
  23933 /src/gclient-git/src/chrome/Hammer/obj
  18169 $OBJ_ROOT/third_party
   8991 -I/src/gclient-git/src/webkit/pending
   5700 $THIRD_PARTY_DIR/WebKit
   4488 -I/src/gclient-git/src/webkit/port/platform/network
   4488 -I/src/gclient-git/src/webkit/port/platform
   3813 $OBJ_ROOT/skia
   3498 $THIRD_PARTY_DIR/icu38
   3456 $THIRD_PARTY_WEBKIT_DIR/JavaScriptCore

Adding these rules cuts the total number of calls to
StringSubber.substitute from 1001817 to 665933.

Review URL: http://codereview.chromium.org/8608


git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@4010 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser