Add memoize decorator to gyp.common, and use it for RelativePath() which is hot (and nontrivial).
Add memoize decorator to gyp.common, and use it for RelativePath() which is hot (and nontrivial).

This speeds up reading gyp input files 10s -> 8.5s for chromium.
Patch by Viet-Trung Luu <viettrungluu@chromium.org>



git-svn-id: e7e1075985beda50ea81ac4472467b4f6e91fc78@938 78cadc50-ecff-11dd-a971-7dbc132099af

bpsinc-native/src_tools_gyp,alexcrichton/gyp,pyokagan/gyp,LazyCodingCat/gyp,msc-/gyp,yjhjstz/gyp,mapbox/gyp,alexcrichton/gyp,carlTLR/gyp,sloanyang/gyp,IllusionRom-deprecated/android_platform_external_chromium_org_tools_gyp,cysp/gyp,saghul/gyn,android-ia/platform_external_chromium_org_tools_gyp,tarc/gyp,bpsinc-native/src_tools_gyp,pandaxcl/gyp,IllusionRom-deprecated/android_platform_external_chromium_org_tools_gyp,duanhjlt/gyp,bnoordhuis/gyp,trafi/gyp,bulldy80/gyp_unofficial,openpeer/webrtc-gyp,saghul/gyn,okumura/gyp,tarc/gyp,mkrautz/gyp-libmumble,duanhjlt/gyp,bulldy80/gyp_unofficial,mumble-voip/libmumble-gyp,turbulenz/gyp,geekboxzone/lollipop_external_chromium_org_tools_gyp,ryfx/gyp,LazyCodingCat/gyp,carlTLR/gyp,carlTLR/gyp,yjhjstz/gyp,Danath/gyp,duanhjlt/gyp,msc-/gyp,pandaxcl/gyp,mistydemeo/gyp,lukeweber/gyp-override,adblockplus/gyp,bnoordhuis/gyp,erikge/watch_gyp,cchamberlain/gyp,svn2github/gyp,amoikevin/gyp,omasanori/gyp,Chilledheart/gyp,clar/gyp,sdklite/gyp,bpsinc-native/src_tools_gyp,yangrongwei/gyp,trafi/gyp,yinquan529/platform-external-chromium_org-tools-gyp,clar/gyp,clar/gyp,Jack-Q/GYP-copy,Omegaphora/external_chromium_org_tools_gyp,ttyangf/pdfium_gyp,mgamer/gyp,ttyangf/gyp,openpeer/webrtc-gyp,azunite/gyp,kevinchen3315/gyp-git,okwasi/gyp,sanyaade-teachings/gyp,duanhjlt/gyp,Phuehvk/gyp,ryfx/gyp,Jack-Q/GYP-copy,springmeyer/gyp,brson/gyp,mumble-voip/libmumble-gyp,amoikevin/gyp,kevinchen3315/gyp-git,saghul/gyn,mistydemeo/gyp,mgamer/gyp,bulldy80/gyp_unofficial,channing/gyp,ryfx/gyp,carlTLR/gyp,enkripsi/gyp,MIPS/external-chromium_org-tools-gyp,bulldy80/gyp_unofficial,MIPS/external-chromium_org-tools-gyp,chromium/gyp,springmeyer/gyp,sdklite/gyp,amoikevin/gyp,bdarnell/gyp,mkrautz/gyp-libmumble,dougbeal/gyp,saghul/gyn,ttyangf/gyp,msc-/gyp,AWhetter/gyp,springmeyer/gyp,cysp/gyp,mgamer/gyp,Danath/gyp,enkripsi/gyp,azunite/gyp_20150930,bnq4ever/gypgoogle,kevinchen3315/gyp-git,brson/gyp,okwasi/gyp,cchamberlain/gyp,channing/gyp,azunite/gyp,Omegaphora/external_chromium_org_tools_gyp,geekboxzone/lollipop_external_chromium_org_tools_gyp,android-ia/platform_external_chromium_org_tools_gyp,pandaxcl/gyp,openpeer/webrtc-gyp,pandaxcl/gyp,clar/gyp,LazyCodingCat/gyp,lukeweber/gyp-override,enkripsi/gyp,dougbeal/gyp,lianliuwei/gyp,AWhetter/gyp,cysp/gyp,sloanyang/gyp,lukeweber/gyp-override,azunite/gyp_20150930,azunite/gyp_20150930,ryfx/gyp,geekboxzone/lollipop_external_chromium_org_tools_gyp,mistydemeo/gyp,svn2github/kgyp,trafi/gyp,trafi/gyp,carlTLR/gyp,Phuehvk/gyp,luvit/gyp,amoikevin/gyp,LazyCodingCat/gyp,mkrautz/gyp-libmumble,sport-monkey/GYP,duanhjlt/gyp,msc-/gyp,mapbox/gyp,openpeer/webrtc-gyp,chromium/gyp,AOSPU/external_chromium_org_tools_gyp,omasanori/gyp,erikge/watch_gyp,Chilledheart/gyp,cysp/gyp,Jack-Q/GYP-copy,mapbox/gyp,svn2github/gyp,svn2github/gyp,luvit/gyp,turbulenz/gyp,ttyangf/gyp,enkripsi/gyp,cchamberlain/gyp,azunite/gyp_20150930,bpsinc-native/src_tools_gyp,okwasi/gyp,svn2github/kgyp,svn2github/kgyp,omasanori/gyp,yangrongwei/gyp,openpeer/webrtc-gyp,lukeweber/gyp-override,Jack-Q/GYP-copy,mkrautz/gyp-libmumble,adblockplus/gyp,ttyangf/pdfium_gyp,yinquan529/platform-external-chromium_org-tools-gyp,pyokagan/gyp,MIPS/external-chromium_org-tools-gyp,bnoordhuis/gyp,bdarnell/gyp,sanyaade-teachings/gyp,Chilledheart/gyp,tarc/gyp,okumura/gyp,yjhjstz/gyp,ttyangf/gyp,luvit/gyp,android-ia/platform_external_chromium_org_tools_gyp,sloanyang/gyp,Phuehvk/gyp,xin3liang/platform_external_chromium_org_tools_gyp,yjhjstz/gyp,yangrongwei/gyp,pyokagan/gyp,AWhetter/gyp,ttyangf/pdfium_gyp,sport-monkey/GYP,enkripsi/gyp,dougbeal/gyp,svn2github/gyp,chromium/gyp,yinquan529/platform-external-chromium_org-tools-gyp,adblockplus/gyp,adblockplus/gyp,Danath/gyp,okwasi/gyp,ryfx/gyp,dougbeal/gyp,sport-monkey/GYP,geekboxzone/lollipop_external_chromium_org_tools_gyp,cchamberlain/gyp,pyokagan/gyp,brson/gyp,mumble-voip/libmumble-gyp,Chilledheart/gyp,yinquan529/platform-external-chromium_org-tools-gyp,tarc/gyp,svn2github/kgyp,Phuehvk/gyp,cysp/gyp,ttyangf/pdfium_gyp,Danath/gyp,channing/gyp,erikge/watch_gyp,bnq4ever/gypgoogle,lianliuwei/gyp,yjhjstz/gyp,azunite/gyp,lianliuwei/gyp,erikge/watch_gyp,tarc/gyp,azunite/gyp,bdarnell/gyp,alexcrichton/gyp,sdklite/gyp,bdarnell/gyp,mgamer/gyp,xin3liang/platform_external_chromium_org_tools_gyp,sanyaade-teachings/gyp,bulldy80/gyp_unofficial,clar/gyp,kevinchen3315/gyp-git,pyokagan/gyp,saghul/gyn,svn2github/kgyp,IllusionRom-deprecated/android_platform_external_chromium_org_tools_gyp,Danath/gyp,AOSPU/external_chromium_org_tools_gyp,channing/gyp,AWhetter/gyp,bnoordhuis/gyp,bnq4ever/gypgoogle,Omegaphora/external_chromium_org_tools_gyp,xin3liang/platform_external_chromium_org_tools_gyp,AWhetter/gyp,azunite/gyp,bnoordhuis/gyp,Phuehvk/gyp,bnq4ever/gypgoogle,sloanyang/gyp,Omegaphora/external_chromium_org_tools_gyp,turbulenz/gyp,sport-monkey/GYP,IllusionRom-deprecated/android_platform_external_chromium_org_tools_gyp,trafi/gyp,msc-/gyp,turbulenz/gyp,luvit/gyp,chromium/gyp,LazyCodingCat/gyp,sdklite/gyp,okumura/gyp,mapbox/gyp,sdklite/gyp,brson/gyp,android-ia/platform_external_chromium_org_tools_gyp,mistydemeo/gyp,sport-monkey/GYP,pandaxcl/gyp,ttyangf/gyp,mgamer/gyp,okumura/gyp,svn2github/gyp,AOSPU/external_chromium_org_tools_gyp,amoikevin/gyp,yangrongwei/gyp,mapbox/gyp,cchamberlain/gyp,Chilledheart/gyp,adblockplus/gyp,erikge/watch_gyp,alexcrichton/gyp,sanyaade-teachings/gyp,lianliuwei/gyp,mumble-voip/libmumble-gyp,ttyangf/pdfium_gyp,sanyaade-teachings/gyp,xin3liang/platform_external_chromium_org_tools_gyp,azunite/gyp_20150930,omasanori/gyp,chromium/gyp,bnq4ever/gypgoogle,springmeyer/gyp,dougbeal/gyp,springmeyer/gyp,AOSPU/external_chromium_org_tools_gyp,Jack-Q/GYP-copy,MIPS/external-chromium_org-tools-gyp,turbulenz/gyp