haiku/headers/private/package
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
..
hpkg Package Kit: Use an object_cache in kernel mode for decompression buffers. 2023-02-28 13:49:00 -05:00
manager Moved BJob, and JobQueue into the support kit. 2015-05-21 21:37:01 +02:00
ActivateRepositoryCacheJob.h more work on package kit: 2011-01-25 19:36:09 +00:00
ActivateRepositoryConfigJob.h Implemented repository writing: 2011-02-09 19:11:23 +00:00
ActivationTransaction.h Package Kit: Proper Installation for First Boot Packages 2021-03-14 09:10:18 +00:00
ChecksumAccessors.h Add StringChecksumAccessor 2013-04-20 21:40:09 +02:00
DaemonClient.h package daemon: Rework error and issue propagation to client 2014-06-15 17:21:01 +02:00
DaemonDefs.h Package Kit: Proper Installation for First Boot Packages 2021-03-14 09:10:18 +00:00
HashableString.h * prefer HashSet and HashMap to respective std-classes where possible 2011-02-15 18:52:03 +00:00
packagefs.h packagefs: Extend PACKAGE_FS_OPERATION_GET_PACKAGE_INFOS ioctl 2014-04-26 15:34:18 +02:00
PackagesDirectoryDefs.h Rename "packages" subdir "config" to "administrative" 2013-04-11 17:44:58 +02:00
RemoveRepositoryJob.h more work on package kit: 2011-01-25 19:36:09 +00:00
TempfileManager.h kernel: atomic_*() functions rework 2013-11-05 22:32:59 +01:00
ValidateChecksumJob.h more work on package kit: 2011-01-25 19:36:09 +00:00