optimized loading of script deps