optimize the complie for server