Re: do less recallocarray calls in rpki-client

2021-09-08 Thread Theo Buehler
On Wed, Sep 08, 2021 at 06:08:53PM +0200, Claudio Jeker wrote: > On Wed, Sep 08, 2021 at 05:40:31PM +0200, Theo Buehler wrote: > > On Wed, Sep 08, 2021 at 03:05:41PM +0200, Claudio Jeker wrote: > > > Looking at profiling information and the code made me realize that these > > > recallocarray calls

Re: do less recallocarray calls in rpki-client

2021-09-08 Thread Claudio Jeker
On Wed, Sep 08, 2021 at 05:40:31PM +0200, Theo Buehler wrote: > On Wed, Sep 08, 2021 at 03:05:41PM +0200, Claudio Jeker wrote: > > Looking at profiling information and the code made me realize that these > > recallocarray calls growing the array by one every time are unnecessary. > > The size of

Re: do less recallocarray calls in rpki-client

2021-09-08 Thread Theo Buehler
On Wed, Sep 08, 2021 at 03:05:41PM +0200, Claudio Jeker wrote: > Looking at profiling information and the code made me realize that these > recallocarray calls growing the array by one every time are unnecessary. > The size of the array is known in advance so use that information and > build it up

do less recallocarray calls in rpki-client

2021-09-08 Thread Claudio Jeker
Looking at profiling information and the code made me realize that these recallocarray calls growing the array by one every time are unnecessary. The size of the array is known in advance so use that information and build it up ahead of time. In the roa case the IP list is double nested and so