If length is important for stretching out, then the longest dimension of the cage is most important. With any rectangular cage the longest dimension is the diagonal, not the length.
In that regard, the 30" cage is less than 2" longer (along the diagonal) than the 24" cage. That's pretty close.
However, I still prefer to keep some of the faster, more aggressive colubrids in a longer, more narrow cage, even when they are otherwise equal for diagonal and perimeter. It just seems like they will "escape" to a far end of the cage rather than holding their ground in a more square cage.
Does that make sense?
-----
Current snakes:
1.1 Gonyosoma oxycephala - (Silver/Yellow)
2.2 Gonyosoma oxycephala - (Green)
4.3 Gonyosoma janseni - (Black)