]> git.tue.mpg.de Git - paraslash.git/commit
btr: Merge buffers on insertion.
authorAndre Noll <maan@tuebingen.mpg.de>
Fri, 30 Dec 2022 13:09:51 +0000 (14:09 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 8 May 2024 17:45:52 +0000 (19:45 +0200)
commitf64cbcc034844628b7e7817e27205cc6b48e9a18
tree036cddbd285dee1acba93f368233759df79adb79
parentdb654ceb7ced70cdd133c547196b3de4207e3112
btr: Merge buffers on insertion.

Currently add_btrb_to_children() simply adds the given buffer
reference to the input queue of all children of the given node even
if the newly added buffer reference points memory adjacent to the
previously added buffer.

Since several helpers iterate over all buffer references, performance
suffers, given enough buffer references. So merge buffers when
possible.

User time: 147s -> 83s, speedup: 44%.
buffer_tree.c
list.h