I realized that animating height is an expensive operation. Even on high end computers (MacBook Pro), animating height often causes jagged animation.
Sample code: