Enhancement #424

Speed up compilation time by factor 2

Added by M. Rolf almost 13 years ago. Updated over 12 years ago.

Status:ResolvedStart date:07/15/2011
Priority:NormalDue date:
Assignee:J. Wienke% Done:

100%

Category:C++
Target version:0.5

Description

C++ compilation takes quite some time at the moment.
Highly desirable to be faster.

Check (for instance) use of forward-declarations and
the pimpl idiom ?

Associated revisions

Revision 85d531e0
Added by J. Moringen almost 13 years ago

Split Factory::createConnectors into 3 methods in src/rsb/Factory.{h,cpp}
refs #424 (should speed up compilation)
refs #447 (may fix the issue)
  • src/rsb/Factory.{h,cpp}: split template method
    Factory::createConnectors into non-template methods
    Factory::createInPullConnectors, Factory::createInPushConnectors and
    Factory::createOutConnectors; changed
    create{Listener,Reader,Informer} accordingly; moved includes and
    pairsToMap to Factory.cpp

History

#1 Updated by J. Wienke over 12 years ago

I would highly appreciate using pimpl. What do others think about this?

#2 Updated by J. Wienke over 12 years ago

This also provides a bit more of ABI / API stability.

#3 Updated by S. Wrede over 12 years ago

Lets stick to the procedure also suggested in the given reference:

Therefore, it's always best to experiment with a few key-classes in a project and learn how this affects your project's build-time.

#4 Updated by J. Wienke over 12 years ago

I will do this. Waiting for the windows build is so annoying.

#5 Updated by J. Wienke over 12 years ago

  • Status changed from New to In Progress

#6 Updated by J. Wienke over 12 years ago

  • Assignee set to J. Wienke

r2884 reduced compile time from 7:16 to 5:25 on my laptop, only one build job. Please note that this may break external clients as some things in the public API are now forward-declared.

A major part of the compile time is used by examples and unit tests. Here, gtest is very expensive.

#7 Updated by J. Wienke over 12 years ago

Switching off tests and examples this reduces from 3:57 to 2:43.

#8 Updated by J. Wienke over 12 years ago

  • Target version set to 0.5
  • % Done changed from 0 to 40

Do you see any other possibilities for speed up now which are cheap to implement?

#9 Updated by J. Wienke over 12 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 40 to 100

This first speed-up must be enough for version 0.5. If more is required, please add another issue.

Also available in: Atom PDF