getPageSize is expensive; getHeight/getWidth is cached and cheap
condense function
further condensation