I do this part time since 2012, see code line trends here:
https://code.onedev.io/projects/onedev-server/stats/lines
I take a lot of time optimizing the performance, and it can easily handle large amount of issues, projects and large repositories at company scale. For large repository, please check the linux demo here: https://code.onedev.io/projects/linux/blob
The code comments can live through file changes, even file renames.
As to commit-pinned permalink, I tried to press Y on GitHub and it does not have any effect. Can you please shed more light on this?