[Tech] Improve efficiency in determine whether pl should be resized when
we changing the window size.