Build performance fixes