I am using Visual Studio IDE for a big C++ project with million lines of codes and hundreds of files.
I notice that each time i build the solution after some small changes across multiple files, it takes more and more time at each subsequent build.
Once i rebuild the solution and though rebuilding took quite some time, each subsequent build is much faster than previous build pre rebuild.
I made the hypothesis that may be compiler puts multiple obj files into one. Each time we make a change and build solution, it has to break big objs into smaller one and hence increasing more number of obj files. This way linking would be slow because of more and more obj files added.
However, i could not find any support for my fancy thinking.. and of course could not prove it before my colleagues.
What is the reason for the slowness build-after-build and why it becomes fast after rebuilds ?