Length caching to improve performance a little bit.