https://bugs.openldap.org/show_bug.cgi?id=10236
--- Comment #3 from aalekseyev@janestreet.com --- Created attachment 1024 --> https://bugs.openldap.org/attachment.cgi?id=1024&action=edit repro
Attached a Rust program that reproduces the problem, using the lmdb-rs crate. (sorry, C is hard)
The program creates 10 million of "dust" particles (small entries), followed by 200k of 80-kb "bricks".
When run with the patch, all bricks are created in <100s (<0.5ms per brick).
When run without the patch, brick creation gets slower and slower after, reaching 500ms/brick. It's been running for a couple of hours so far and it's only at 170k.