pika icon indicating copy to clipboard operation
pika copied to clipboard

Reduce debug bloat

Open msimberg opened this issue 2 years ago • 5 comments

This is not ok:

> ls -lh test/unit/eigensolver/test_tridiag_solver_full
-rwxr-xr-x 1 simbergm csstaff 1.5G Sep  6 11:49 test/unit/eigensolver/test_tridiag_solver_full

msimberg avatar Sep 06 '22 10:09 msimberg

Is the debug bloat coming from pika?

aurianer avatar Sep 06 '22 12:09 aurianer

Is the debug bloat coming from pika?

Yes, at least to some extent. Here are the 50 longest strings in the test executable from https://github.com/eth-cscs/DLA-Future/pull/617: bloat.txt.

A lot of it is simply nested senders and receivers. Some of it seems to be boost's small vector. Some of it is possibly unnecessary lambdas. There's probably more.

msimberg avatar Sep 06 '22 13:09 msimberg

A slightly more useful namespace change than the namespace detail to namespace impl change that I previously suggested is to collapse sender adaptor implementation namespaces to the top-level namespace. E.g.

namespace pika::execution::experimental::when_all_detail`

to

namespace pika::when_all_detail`

or at the very least

namespace pika::execution::when_all_detail`

. I did this change on the tridiagonal solver test in DLA-Future and saw a roughly 1% reduction in debug bloat. We have more than just one sender adaptor so I would expect this change to reduce the size by up to about 10%. The change is also very localized so it's fairly simple to do. It's a bit of a dumb change, but I'll take 10%.

Other changes will hopefully let us shave a bit more off the the bloat.

msimberg avatar Sep 09 '22 11:09 msimberg

#446 is a start. I would re-evaluate this on the pika side once we've done #293. I think there's some room for improvement also on the DLA-Future side.

msimberg avatar Sep 09 '22 14:09 msimberg

Some more work has been done in https://github.com/eth-cscs/DLA-Future/pull/674.

msimberg avatar Oct 31 '22 10:10 msimberg