On Wed, Aug 09, 2023 at 08:48:54AM +0000, David Laight wrote: > ... > > If you split headers into so many small pieces then all > > source files will start with 3 screens of includes. I do not see > > how this helps with maintainability. > > You also slow down compilations. Ingo's patches showed the opposite. Do you have actual try and numbers? > A few extra definitions in a 'leaf' header (one without any > #includes) don't really matter. > If a header includes other 'leaf' headers that doesn't matter > much. > > But the deep include chains caused by a low level header > including a main header are what causes pretty much every > header to get included in every compilation. > > Breaking the deep chains is probably more useful than > adding leaf headers for things that are in a header pretty > much everything in going to include anyway. > > The is probably scope for counting the depth of header > includes by looking at what each header includes. -- With Best Regards, Andy Shevchenko