improve the performance of subscribe/unsubscribe