For most spells, I don't think it matters if the players know about them in advance, but some spells can be build defining, and learning about a spell 3 levels after you made build choices that could have synergized with the new spell can be frustrating.
But seriously, 5000 spells?