optimize encode performance