octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: visibility attributes


From: Rik
Subject: Re: visibility attributes
Date: Fri, 26 Feb 2016 09:46:37 -0800

On 02/25/2016 07:00 PM, address@hidden wrote:
> Greetings again, all.
>
> Olaf, I take your point about inline functions in different modules.  I'd
> heard rumours of the linker being able to do it and had assumed it was
> universal now, but I must just have been thinking of g++.
>
> I've found another more egregious example:  read_sparse_matrix is defined in
> sparse.h.  It is about 100 lines line, and I/O heavy.  I modified it to fix
> bug #38414, and found myself recompiling the GUI, all of
> libinterp/operators, most or all of libinterp/corefcn, libinterp/parse-tree
> etc.
>
> It seems the problem is more than just too much in headers, but too many
> headers being included, possibly indirectly through other headers.
This seems a common occurrence.  Isn't there some sort of Unix tool for
finding the true dependencies and informing the programmer which header
files are unnecessary?
>
> Rik, I agree reducing visibility would be good too, especially if it reduces
> executable size as well as just link time.
Check out the claimed benefits of attribute visibility here:
https://gcc.gnu.org/wiki/Visibility.

Also, are you using ccache?  It doesn't solve everything, but I find it
helps quite a bit with reducing the rebuild time for Octave.  I will, one
day, write up a section for the Appendix of the manual detailing how and
why ccache is beneficial.  I benchmarked build times at the last OctConf
with Doug's new 8-core laptop.  For the case of touching one file deep in
liboctave and then running 'make all' the build time was 9 minutes without
ccache and just 2 minutes with ccache.

---Rik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]