fix desktop build and improve load performance