improve stream performance