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: de016e52bd170d2d4f2344f9bf92d50478b649e0@4010 0039d316-1c4b-4281-b951-d872f2087c98

nacl-webkit/chrome_deps,hujiajie/pa-chromium,keishi/chromium,rogerwang/chromium,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,patrickm/chromium.src,keishi/chromium,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,Just-D/chromium-1,hujiajie/pa-chromium,dednal/chromium.src,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ltilve/chromium,timopulkkinen/BubbleFish,dushu1203/chromium.src,keishi/chromium,rogerwang/chromium,anirudhSK/chromium,ChromiumWebApps/chromium,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,rogerwang/chromium,chuan9/chromium-crosswalk,jaruba/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,axinging/chromium-crosswalk,robclark/chromium,dednal/chromium.src,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,keishi/chromium,krieger-od/nwjs_chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,dednal/chromium.src,patrickm/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk,keishi/chromium,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,dednal/chromium.src,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,Jonekee/chromium.src,littlstar/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,anirudhSK/chromium,hujiajie/pa-chromium,anirudhSK/chromium,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,keishi/chromium,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,zcbenz/cefode-chromium,jaruba/chromium.src,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,zcbenz/cefode-chromium,ondra-novak/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,junmin-zhu/chromium-rivertrail,axinging/chromium-crosswalk,ChromiumWebApps/chromium,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,markYoungH/chromium.src,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,rogerwang/chromium,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,littlstar/chromium.src,dednal/chromium.src,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,jaruba/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,Chilledheart/chromium,dushu1203/chromium.src,dushu1203/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ltilve/chromium,Pluto-tv/chromium-crosswalk,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,littlstar/chromium.src,zcbenz/cefode-chromium,Jonekee/chromium.src,ltilve/chromium,pozdnyakov/chromium-crosswalk,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,robclark/chromium,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,Chilledheart/chromium,zcbenz/cefode-chromium,hgl888/chromium-crosswalk,Just-D/chromium-1,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,Jonekee/chromium.src,patrickm/chromium.src,ChromiumWebApps/chromium,zcbenz/cefode-chromium,rogerwang/chromium,anirudhSK/chromium,littlstar/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,Chilledheart/chromium,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,Just-D/chromium-1,robclark/chromium,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,dushu1203/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,bright-sparks/chromium-spacewalk,rogerwang/chromium,Jonekee/chromium.src,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,jaruba/chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,robclark/chromium,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,markYoungH/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,keishi/chromium,anirudhSK/chromium,M4sse/chromium.src,anirudhSK/chromium,zcbenz/cefode-chromium,robclark/chromium,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,dednal/chromium.src,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,keishi/chromium,anirudhSK/chromium,timopulkkinen/BubbleFish,Chilledheart/chromium,M4sse/chromium.src,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,littlstar/chromium.src,Jonekee/chromium.src,ondra-novak/chromium.src,keishi/chromium,dednal/chromium.src,ChromiumWebApps/chromium,rogerwang/chromium,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,rogerwang/chromium,dushu1203/chromium.src,patrickm/chromium.src,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,hujiajie/pa-chromium,Chilledheart/chromium,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,ChromiumWebApps/chromium,littlstar/chromium.src,mogoweb/chromium-crosswalk,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,robclark/chromium,ChromiumWebApps/chromium,patrickm/chromium.src,jaruba/chromium.src,zcbenz/cefode-chromium,Jonekee/chromium.src,markYoungH/chromium.src,robclark/chromium,nacl-webkit/chrome_deps,M4sse/chromium.src,rogerwang/chromium,nacl-webkit/chrome_deps,PeterWangIntel/chromium-crosswalk,robclark/chromium,hgl888/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,robclark/chromium,Just-D/chromium-1,robclark/chromium,hujiajie/pa-chromium,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,ltilve/chromium,pozdnyakov/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,keishi/chromium,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,keishi/chromium,timopulkkinen/BubbleFish,markYoungH/chromium.src,markYoungH/chromium.src