haiku/headers/private/package/hpkg
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
..
v1 Clone read support functionality for HPKG format version 1 2013-05-25 01:12:22 +02:00
BlockBufferPoolImpl.h Rename BBlockBufferCache and friends to *Pool* 2013-05-25 01:12:25 +02:00
HPKGDefsPrivate.h hpkg attribute tags: use 7 bits for attribute ID 2013-05-25 01:12:34 +02:00
PackageFileHeapAccessorBase.h Package Kit: Use an object_cache in kernel mode for decompression buffers. 2023-02-28 13:49:00 -05:00
PackageFileHeapReader.h Switch package file accessor classes to use BPositionIO 2014-07-12 15:40:22 +02:00
PackageFileHeapWriter.h Switch package file accessor classes to use BPositionIO 2014-07-12 15:40:22 +02:00
PackageReaderImpl.h PackageReaderImpl: Delay reading sections until ParseContent() 2014-07-13 17:57:56 +02:00
PackageWriterImpl.h BPackageWriter::Recompress(): Change param to BPositionIO* 2014-07-13 17:57:57 +02:00
PoolBuffer.h Rename BBlockBufferCache and friends to *Pool* 2013-05-25 01:12:25 +02:00
ReaderImplBase.h kit/package: Error on short file read 2019-08-05 15:07:24 +00:00
RepositoryReaderImpl.h Switch package file accessor classes to use BPositionIO 2014-07-12 15:40:22 +02:00
RepositoryWriterImpl.h Packagekit: Fix -Wmismatched-tags 2018-08-19 20:36:25 +00:00
Stacker.h
Strings.h PackageWriterImpl::_AttributeRemoved(): Update string cache 2013-10-25 22:54:44 +02:00
WriterImplBase.h BPackageWriter: Add BPositionIO support 2014-07-13 17:57:55 +02:00