Optimize asset build

Continuation of  #277