You autogenerate 50k lines of code, you do not edit them, and still have to recompile them each time ? Do your changes forces to autogenerate 50k LoCs each time ?
Do you have any idea which part of the Nim symbols takes the most time to compile ? Is the import of all the symbols taking time in the compilation of the bigger project ? Maybe you can do a CT-RT tradeoff by generating a binary with these Nim autogenerated lines, and access it with a CLI interface ? These are all very naive questions, I am not as experienced as all the other devs that answered you.