Changing order of compile steps to speed up disableNodeCache perf

Hello eford, 

Please review the following commits I made in branch 'jeremy-perf'.

R=eford