Comment
Comment by ufo
Keep in min that tex is really old software, from a time when computers weren't as powerful. So it makes a bit of sense that it was architected to make multiple passes over the input instead of storing the whole document in memory.