Massive efficiency improvement for time windowing.