Reduce number of calls to filterAllTargetsInProject
Reduce number of calls to filterAllTargetsInProject

Summary: Function `ProjectCommand.createPartialGraphs` used to call `filterAllTargetsInProject` multiple times when it was called. Each invocation of `filterAllTargetsInProject` triggered a search for all BUCK files in the project, which required complete traversal of the project file tree. This patch only calls `filterAllTargetsInProject` once and stores the complete graph in memory to speed up its further use.

Test Plan: Use buck to generate project files for XCode and check that XCode can successfully compile the project.

artiya4u/buck,MarkRunWu/buck,mogers/buck,artiya4u/buck,k21/buck,nguyentruongtho/buck,luiseduardohdbackup/buck,darkforestzero/buck,marcinkwiatkowski/buck,pwz3n0/buck,k21/buck,dpursehouse/buck,stuhood/buck,zhuxiaohao/buck,zhuxiaohao/buck,illicitonion/buck,bocon13/buck,liuyang-li/buck,ilya-klyuchnikov/buck,mogers/buck,robbertvanginkel/buck,JoelMarcey/buck,rmaz/buck,raviagarwal7/buck,romanoid/buck,dsyang/buck,kageiit/buck,siddhartharay007/buck,shybovycha/buck,sdwilsh/buck,dushmis/buck,raviagarwal7/buck,Learn-Android-app/buck,Addepar/buck,illicitonion/buck,dushmis/buck,vschs007/buck,shs96c/buck,mnuessler/buck,lukw00/buck,marcinkwiatkowski/buck,ilya-klyuchnikov/buck,dushmis/buck,mnuessler/buck,tgummerer/buck,OkBuilds/buck,darkforestzero/buck,Learn-Android-app/buck,sdwilsh/buck,zpao/buck,Distrotech/buck,janicduplessis/buck,dsyang/buck,neonichu/buck,JoelMarcey/buck,kageiit/buck,zhan-xiong/buck,rowillia/buck,janicduplessis/buck,OkBuilds/buck,Distrotech/buck,dsyang/buck,JoelMarcey/buck,artiya4u/buck,darkforestzero/buck,raviagarwal7/buck,1yvT0s/buck,artiya4u/buck,vine/buck,davido/buck,davido/buck,LegNeato/buck,marcinkwiatkowski/buck,pwz3n0/buck,LegNeato/buck,Learn-Android-app/buck,SeleniumHQ/buck,justinmuller/buck,vschs007/buck,dushmis/buck,tgummerer/buck,sdwilsh/buck,k21/buck,liuyang-li/buck,raviagarwal7/buck,neonichu/buck,LegNeato/buck,facebook/buck,robbertvanginkel/buck,ilya-klyuchnikov/buck,clonetwin26/buck,robbertvanginkel/buck,mikekap/buck,mogers/buck,MarkRunWu/buck,Addepar/buck,davido/buck,vine/buck,tgummerer/buck,darkforestzero/buck,liuyang-li/buck,dushmis/buck,rhencke/buck,Learn-Android-app/buck,raviagarwal7/buck,ilya-klyuchnikov/buck,rmaz/buck,raviagarwal7/buck,Dominator008/buck,Addepar/buck,pwz3n0/buck,zhan-xiong/buck,brettwooldridge/buck,hgl888/buck,1yvT0s/buck,zhuxiaohao/buck,mikekap/buck,k21/buck,hgl888/buck,brettwooldridge/buck,1yvT0s/buck,k21/buck,davido/buck,sdwilsh/buck,clonetwin26/buck,OkBuilds/buck,bocon13/buck,darkforestzero/buck,bocon13/buck,daedric/buck,lukw00/buck,janicduplessis/buck,Learn-Android-app/buck,MarkRunWu/buck,mikekap/buck,Distrotech/buck,Addepar/buck,robbertvanginkel/buck,zpao/buck,facebook/buck,illicitonion/buck,zhan-xiong/buck,rhencke/buck,neonichu/buck,stuhood/buck,liuyang-li/buck,zpao/buck,vschs007/buck,k21/buck,zhan-xiong/buck,justinmuller/buck,zhuxiaohao/buck,janicduplessis/buck,rmaz/buck,lukw00/buck,dsyang/buck,ilya-klyuchnikov/buck,hgl888/buck,pwz3n0/buck,brettwooldridge/buck,lukw00/buck,dpursehouse/buck,shybovycha/buck,rmaz/buck,romanoid/buck,justinmuller/buck,daedric/buck,romanoid/buck,illicitonion/buck,bocon13/buck,zhan-xiong/buck,LegNeato/buck,Addepar/buck,k21/buck,dpursehouse/buck,tgummerer/buck,bocon13/buck,nguyentruongtho/buck,Addepar/buck,zhan-xiong/buck,clonetwin26/buck,illicitonion/buck,rhencke/buck,neonichu/buck,shybovycha/buck,darkforestzero/buck,shs96c/buck,Dominator008/buck,LegNeato/buck,shybovycha/buck,vine/buck,clonetwin26/buck,vine/buck,bocon13/buck,Dominator008/buck,mogers/buck,ilya-klyuchnikov/buck,brettwooldridge/buck,darkforestzero/buck,daedric/buck,clonetwin26/buck,Heart2009/buck,rowillia/buck,LegNeato/buck,davido/buck,hgl888/buck,Dominator008/buck,artiya4u/buck,vine/buck,Learn-Android-app/buck,davido/buck,rhencke/buck,darkforestzero/buck,nguyentruongtho/buck,rowillia/buck,LegNeato/buck,Heart2009/buck,dushmis/buck,davido/buck,zhan-xiong/buck,stuhood/buck,Addepar/buck,davido/buck,Learn-Android-app/buck,shybovycha/buck,stuhood/buck,sdwilsh/buck,ilya-klyuchnikov/buck,stuhood/buck,Distrotech/buck,raviagarwal7/buck,davido/buck,tgummerer/buck,shybovycha/buck,Heart2009/buck,sdwilsh/buck,luiseduardohdbackup/buck,mogers/buck,romanoid/buck,vschs007/buck,facebook/buck,rowillia/buck,vine/buck,shybovycha/buck,vschs007/buck,brettwooldridge/buck,clonetwin26/buck,artiya4u/buck,dushmis/buck,janicduplessis/buck,k21/buck,artiya4u/buck,SeleniumHQ/buck,rhencke/buck,zpao/buck,mnuessler/buck,illicitonion/buck,Dominator008/buck,marcinkwiatkowski/buck,raviagarwal7/buck,luiseduardohdbackup/buck,brettwooldridge/buck,illicitonion/buck,sdwilsh/buck,dsyang/buck,darkforestzero/buck,Distrotech/buck,grumpyjames/buck,janicduplessis/buck,davido/buck,robbertvanginkel/buck,justinmuller/buck,zhuxiaohao/buck,clonetwin26/buck,Addepar/buck,grumpyjames/buck,siddhartharay007/buck,zhan-xiong/buck,Heart2009/buck,Dominator008/buck,marcinkwiatkowski/buck,brettwooldridge/buck,stuhood/buck,JoelMarcey/buck,Addepar/buck,k21/buck,LegNeato/buck,liuyang-li/buck,nguyentruongtho/buck,Distrotech/buck,grumpyjames/buck,neonichu/buck,daedric/buck,mikekap/buck,facebook/buck,JoelMarcey/buck,vschs007/buck,pwz3n0/buck,SeleniumHQ/buck,dushmis/buck,zpao/buck,kageiit/buck,brettwooldridge/buck,robbertvanginkel/buck,marcinkwiatkowski/buck,OkBuilds/buck,Dominator008/buck,justinmuller/buck,ilya-klyuchnikov/buck,LegNeato/buck,Dominator008/buck,shybovycha/buck,OkBuilds/buck,mikekap/buck,marcinkwiatkowski/buck,luiseduardohdbackup/buck,rhencke/buck,OkBuilds/buck,LegNeato/buck,nguyentruongtho/buck,vine/buck,sdwilsh/buck,mikekap/buck,sdwilsh/buck,Distrotech/buck,ilya-klyuchnikov/buck,romanoid/buck,artiya4u/buck,SeleniumHQ/buck,neonichu/buck,SeleniumHQ/buck,davido/buck,mnuessler/buck,shs96c/buck,zhan-xiong/buck,mikekap/buck,janicduplessis/buck,vschs007/buck,SeleniumHQ/buck,pwz3n0/buck,clonetwin26/buck,vschs007/buck,shs96c/buck,OkBuilds/buck,illicitonion/buck,Addepar/buck,rhencke/buck,tgummerer/buck,rowillia/buck,justinmuller/buck,grumpyjames/buck,dsyang/buck,Learn-Android-app/buck,pwz3n0/buck,grumpyjames/buck,illicitonion/buck,tgummerer/buck,dsyang/buck,clonetwin26/buck,daedric/buck,marcinkwiatkowski/buck,mogers/buck,1yvT0s/buck,Heart2009/buck,illicitonion/buck,rowillia/buck,robbertvanginkel/buck,robbertvanginkel/buck,zhan-xiong/buck,facebook/buck,ilya-klyuchnikov/buck,dpursehouse/buck,dpursehouse/buck,romanoid/buck,shs96c/buck,janicduplessis/buck,stuhood/buck,SeleniumHQ/buck,shs96c/buck,OkBuilds/buck,OkBuilds/buck,rhencke/buck,mogers/buck,brettwooldridge/buck,clonetwin26/buck,darkforestzero/buck,brettwooldridge/buck,grumpyjames/buck,dsyang/buck,justinmuller/buck,romanoid/buck,rmaz/buck,vine/buck,rowillia/buck,liuyang-li/buck,MarkRunWu/buck,mikekap/buck,shs96c/buck,pwz3n0/buck,OkBuilds/buck,SeleniumHQ/buck,bocon13/buck,mnuessler/buck,lukw00/buck,1yvT0s/buck,mogers/buck,bocon13/buck,luiseduardohdbackup/buck,janicduplessis/buck,marcinkwiatkowski/buck,JoelMarcey/buck,clonetwin26/buck,robbertvanginkel/buck,lukw00/buck,sdwilsh/buck,rmaz/buck,Dominator008/buck,vine/buck,SeleniumHQ/buck,shybovycha/buck,facebook/buck,justinmuller/buck,vine/buck,janicduplessis/buck,facebook/buck,Learn-Android-app/buck,stuhood/buck,raviagarwal7/buck,mnuessler/buck,Addepar/buck,luiseduardohdbackup/buck,nguyentruongtho/buck,nguyentruongtho/buck,grumpyjames/buck,daedric/buck,tgummerer/buck,Learn-Android-app/buck,rmaz/buck,luiseduardohdbackup/buck,OkBuilds/buck,zhuxiaohao/buck,MarkRunWu/buck,siddhartharay007/buck,LegNeato/buck,illicitonion/buck,daedric/buck,shs96c/buck,clonetwin26/buck,JoelMarcey/buck,mogers/buck,romanoid/buck,rowillia/buck,Addepar/buck,ilya-klyuchnikov/buck,grumpyjames/buck,daedric/buck,bocon13/buck,Distrotech/buck,justinmuller/buck,hgl888/buck,rmaz/buck,lukw00/buck,lukw00/buck,lukw00/buck,shs96c/buck,rowillia/buck,darkforestzero/buck,dsyang/buck,zpao/buck,hgl888/buck,OkBuilds/buck,dsyang/buck,Heart2009/buck,rmaz/buck,zhuxiaohao/buck,vschs007/buck,hgl888/buck,daedric/buck,neonichu/buck,MarkRunWu/buck,1yvT0s/buck,romanoid/buck,liuyang-li/buck,JoelMarcey/buck,kageiit/buck,brettwooldridge/buck,Heart2009/buck,vschs007/buck,dpursehouse/buck,robbertvanginkel/buck,vschs007/buck,kageiit/buck,rmaz/buck,LegNeato/buck,mikekap/buck,MarkRunWu/buck,clonetwin26/buck,k21/buck,dsyang/buck,brettwooldridge/buck,mikekap/buck,hgl888/buck,raviagarwal7/buck,luiseduardohdbackup/buck,marcinkwiatkowski/buck,davido/buck,SeleniumHQ/buck,rhencke/buck,romanoid/buck,artiya4u/buck,Heart2009/buck,LegNeato/buck,dpursehouse/buck,pwz3n0/buck,shs96c/buck,1yvT0s/buck,mikekap/buck,JoelMarcey/buck,darkforestzero/buck,grumpyjames/buck,SeleniumHQ/buck,JoelMarcey/buck,JoelMarcey/buck,stuhood/buck,shybovycha/buck,daedric/buck,rowillia/buck,sdwilsh/buck,pwz3n0/buck,raviagarwal7/buck,marcinkwiatkowski/buck,rmaz/buck,lukw00/buck,lukw00/buck,sdwilsh/buck,vschs007/buck,justinmuller/buck,grumpyjames/buck,stuhood/buck,liuyang-li/buck,siddhartharay007/buck,siddhartharay007/buck,shs96c/buck,artiya4u/buck,illicitonion/buck,Distrotech/buck,daedric/buck,zhuxiaohao/buck,rowillia/buck,marcinkwiatkowski/buck,marcinkwiatkowski/buck,illicitonion/buck,tgummerer/buck,dsyang/buck,dsyang/buck,romanoid/buck,robbertvanginkel/buck,JoelMarcey/buck,brettwooldridge/buck,siddhartharay007/buck,shybovycha/buck,robbertvanginkel/buck,luiseduardohdbackup/buck,janicduplessis/buck,vschs007/buck,ilya-klyuchnikov/buck,siddhartharay007/buck,shs96c/buck,Addepar/buck,janicduplessis/buck,kageiit/buck,raviagarwal7/buck,1yvT0s/buck,mogers/buck,liuyang-li/buck,daedric/buck,siddhartharay007/buck,davido/buck,JoelMarcey/buck,SeleniumHQ/buck,liuyang-li/buck,dushmis/buck,raviagarwal7/buck,zhuxiaohao/buck,k21/buck,MarkRunWu/buck,zpao/buck,tgummerer/buck,romanoid/buck,tgummerer/buck,shybovycha/buck,mnuessler/buck,sdwilsh/buck,bocon13/buck,hgl888/buck,artiya4u/buck,Learn-Android-app/buck,Dominator008/buck,grumpyjames/buck,bocon13/buck,daedric/buck,justinmuller/buck,Dominator008/buck,rhencke/buck,vine/buck,dpursehouse/buck,darkforestzero/buck,dushmis/buck,Distrotech/buck,siddhartharay007/buck,pwz3n0/buck,Dominator008/buck,romanoid/buck,rhencke/buck,mnuessler/buck,robbertvanginkel/buck,rowillia/buck,shs96c/buck,zhan-xiong/buck,ilya-klyuchnikov/buck,rmaz/buck,stuhood/buck,zhan-xiong/buck,Heart2009/buck,liuyang-li/buck,zhan-xiong/buck,rmaz/buck,k21/buck,mnuessler/buck,bocon13/buck,mogers/buck,shybovycha/buck,1yvT0s/buck,mikekap/buck,justinmuller/buck,k21/buck,Distrotech/buck,grumpyjames/buck,neonichu/buck,justinmuller/buck,kageiit/buck,neonichu/buck,OkBuilds/buck,SeleniumHQ/buck