api performance optimization