Hello guys, been a long time On 25 February 2017 at 02:15, Sergio Lopez <[email protected]> wrote:
> Hi, > > [...] Taking a look at tmpfs's code, I tracked down the problem to realloc(). > When growing a buffer in relatively large chunks (4K), it always resorts to > malloc()+memcpy(), making the operation unbearable slow. > > The real problem here is that tmpfs implementation is trivial (therefore inefficient) to begin with. Any implementation where buffer is being increased by constant amount has quadratic worst case complexity in length of final buffer. Increasing the buffer size by a fraction of current size would fix worst case behavior on tmpfs side (which might still be terrible for more elaborate work with multiple growing files), and doing some more changes to make buffers discontiguous for bigger files would be even better. I'm not implementing any of that though, just thought I'd let you know I'm still alive. :) -- J. Z.
_______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/listinfo/helenos-devel
