<p>I'm currently working on a quite large library (5M lines of code, in C++ under VS2005, 1 solution and close to 100 projects). Even though we distribute compilation, and use incremental linking, recompilation and relinking after small source modifications takes between a few minutes (usually at least 3) and close to one hour.</p>

<p>This means that our modify code/build/debug cycles tend to be really long (to my taste!), and it's quite easy to lose the 'flow' during a build: there's typically not much time to do anything useful (maybe do a bit of email, otherwise read some article online or a few pages of a book).</p>

<p>When writing new code or doing major refactoring, I try to compile one file at a time only. However, during debugging for example, it really gets on my nerves!</p>

<p>I'm wondering how I could optimize my time? I guess I'm not the only one in that situation: what do/would <em>you</em> do?</p>

[{'answer_id': 38455, 'author': 'Domenic', 'author_id': 3191, 'author_profile': 'https://Stackoverflow.com/users/3191', 'pm_score': 1, 'selected': False, 'text': '<p>I don\'t know much about development at that level, but... it seems like it would be a good idea to separate into multiple solutions. You could have a final "pre-ship" step that consolidates them all into a single .dll if you/your customers really insist.</p>\n\n<p>Compare, e.g., to the .NET Framework where we have lots of different assemblies (System, System.Drawing, System.Windows.Forms, System.Xml...). Presumably all of these could be in different solutions, referencing each other\'s build results (as opposed to all in a single solution, referencing each other as projects).</p>\n'}, {'answer_id': 38462, 'author': 'OysterD', 'author_id': 2638, 'author_profile': 'https://Stackoverflow.com/users/2638', 'pm_score': 0, 'selected': False, 'text': "<p>@Domenic: indeed, it would be a good thing... However, a whole team's been at it for some time now, and until they succeed we are stuck with a single .dll and something quite monolithic :-(</p>\n"}, {'answer_id': 152843, 'author': 'argatxa', 'author_id': 23460, 'author_profile': 'https://Stackoverflow.com/users/23460', 'pm_score': 1, 'selected': False, 'text': "<p>Step by step... </p>\n\n<p>The only solution is to start isolating blocks of code. If you don't have too much implementation leakage (see below **) then start building fachades that isolate the classes behind. Move those clases to a different project and make the fachade load the dlls on startup and redirect the calls to factory methods. </p>\n\n<p>Focus on finding areas/libraries that are fairly stable and split them to isolated library dlls. Building and versioning them separately will help you to avoid integration pains. </p>\n\n<p>I have been on that situation on the past and the only way is to take the task with patience.</p>\n\n<p>By the way, a good side effect of splitting code is that interfaces became cleaner and the output dll size is smaller!!. In our project suffling/reorganizing the code around and reducing the amount of gratuitous includes reduced the final output by 30%. </p>\n\n<p>good luck!</p>\n\n<p>** --> a consumer calling obj->GetMemberZ()->GetMemberYT->GiveMeTheData(param1, param2)</p>\n"}]
['https://Stackoverflow.com/questions/38427', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2638/']