optimize framework loading