Tips for working in a large library?

I am currently working on a rather large library (5M lines of code, in C ++ under VS2005, 1 solution and about 100 projects). Despite the fact that we distribute the compilation and use incremental binding, recompiling and re-moving after minor modifications of the source takes from several minutes (usually at least 3) and close to one hour.

This means that our code / assembly / debugging change codes tend to be very long (for my taste!), And itโ€™s pretty easy to lose the โ€œthreadโ€ during the build: usually there isnโ€™t much time to do anything useful (maybe a little email, otherwise read the article online or a few pages of the book).

When writing new code or doing a lot of refactoring, I try to compile only one file at a time. However, during debugging, for example, it is really nervous!

I am wondering how I could optimize my time? I think I'm not the only one in this situation: what are you doing / will do?

+4
source share
3 answers

I know little about development at this level, but ... it seems like it would be nice to split into several solutions. You may have the final step before submitting, which merges them all into a single .dll if you / your clients really insist.

Compare, for example, with the .NET Framework, where we have many different assemblies (System, System.Drawing, System.Windows.Forms, System.Xml ...). Presumably, they can all be in different solutions, referring to each other on the assembly result (unlike all in the same solution, referring to each other as projects).

+1
source

Step by step...

The only solution is to start allocating blocks of code. If you don't have too many implementation leaks (see below **), then start building fachades that isolate classes behind. Move these classes to another project and make fachade load the dll at startup and redirect calls to factory methods.

Focus on finding areas / libraries that are fairly stable and sharing them into isolated DLLs. Building and managing versions separately will help you avoid integration pains.

I have been in this situation in the past, and the only way is to take the task with patience.

By the way, a good side effect of the separation code is that the interfaces are cleaner and the size of the output dlls is smaller !!. In our project, the suffix / reorganization of the code around and the reduction in the number of gratuitous ones includes a 30% reduction in the final productivity.

Good luck

** โ†’ user call obj-> GetMemberZ () โ†’ GetMemberYT-> GiveMeTheData (param1, param2)

+1
source

@Domenic: indeed, that would be good ... However, the whole team was on it for a while, and until they succeed, we are stuck in one .dll and something rather monolithic: - (

0
source

Source: https://habr.com/ru/post/1276508/


All Articles