advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Which other techniques for reducing compilation time can you suggest? What are their tradeoffs? Tell us in the DevX C++ Forum.
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 3/5 | Rate this item | 3 users have rated this item.
 

Use the Pimpl Idiom to Reduce Compilation Time and Enhance Encapsulation

Changes in the implementation details of a single infrastructure class don't have to trigger a wholesale recompilation of the numerous classes referring to the modified class. Find out how applying the Pimpl idiom can help you reduce compilation time and enhance encapsulation.  


advertisement
ong compilation time is an issue of concern for many large-scale C++ projects. In some cases, a typical build cycle takes up a whole night or an entire weekend. This problem is aggravated by the fact that changes in the implementation details of a single infrastructure class trigger a wholesale recompilation of numerous classes that refer to the modified class. This solution will show you how to apply the Pimpl idiom to reduce compile-time dependencies, and thus reduce compilation time. Another benefit of using this technique is a higher level of encapsulation.


How can you avoid a wholesale recompilation when a change in the implementation details of a frequently-used class has taken place?


Use the Pimpl idiom, also known as the compiler-firewall idiom.

  Next Page: Presenting the Problem
Page 1: IntroductionPage 3: Apply the Pimpl Idiom
Page 2: Presenting the Problem 
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs