window size optimizations