haiku/headers
Augustin Cavalier 0ecd7516de Package Kit: Use an object_cache in kernel mode for decompression buffers.
The kernel heap only uses object caches for objects up to size 8192.
Larger allocations have to go through the raw allocator. That can
get pretty expensive.

Adding instrumentation around the malloc/free calls in this function
showed that on my machine, some 596ms during boot were spent on
*malloc/free alone*, all else aside. After this change, we are at
around 110ms, or a >5x improvement. Running an fgrep -R on /system/
after boot increased the cumulative time in memory functions to over
5 seconds, while after this change it is "only" 1170ms.

Honestly, it seems like the object depots should be able to be faster
than that, even if this function is called thousands of times. But that
is a problem for a different investigation.

It would be even faster for every consumer of this data in
packagefs just allocated one set of buffers up front, or at least
for a single "read session", but plumbing that all the way
through the myriad abstractions of the Package Kit will
not be easy, and is left for another time, as well.
2023-02-28 13:49:00 -05:00
..
build libroot_build & fs_shell: Provide _kern_ functions for readv/writev... 2023-02-14 00:49:52 -05:00
compatibility sys/uio: Add preadv/pwritev. 2023-02-24 16:31:51 +00:00
config
cpp
glibc
libs Removed 'register' storage class compiler warnings 2022-09-12 14:03:28 +00:00
os BMenuField: allow to use non-fixed size in combination with layout mode 2023-02-21 10:47:46 +00:00
posix Rewrite <netdb.h> and drop a lot of non-standard stuff. 2023-02-27 22:51:17 -05:00
private Package Kit: Use an object_cache in kernel mode for decompression buffers. 2023-02-28 13:49:00 -05:00
tools cppunit: Enable CPPUNIT_HAVE_SSTREAM for the non-legacy GCC. 2022-03-29 19:09:38 -04:00