performance improve in client.c