Cache length before loop.

But anyway, why is this code necessary? The list never changes so why not just return **position** in **getItemdId()** (which is what the super class does anyway, so it's not needed here). So I think all this class really needs to do is override **hasStableIds()** to return **true**.