Opened 18 years ago
Closed 18 years ago
#1433 closed enhancement (fixed)
pespacket.cpp Allocator optimization
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | dvb | Version: | |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
With [9223] 2/3 of the time of ParseTable was spent in get_{188|4096}_block, since ~80% of the calls actually do memory allocation.
The attached patch halves the size of the blocks, unrolls a expensive vector method from the inner loop and frees the allocators only if more than one block was allocated.
The last point is probably the simplest compromise between saving memory allocations and smallest memory footprint.
With the patch get_{188|4096}_block drops to 3%, and the ratio of calls with memory allocation drops under 1%.
Attachments (2)
Change History (5)
Changed 18 years ago by
Attachment: | pespacket_block_allocation.patch added |
---|
comment:1 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Changed 18 years ago by
Attachment: | pespacket_fix.patch added |
---|
comment:2 Changed 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
The pespacket_fix patch adds also the last returned block to to available blocks if the allocator holds only one unit.
sorry, seen this error only after the commit
(In [9238]) Closes #1433, by applying patch.
This tweaks some params in the pes memory allocator to get a big bump in performace.
The method causing most of the allocations will actually be a zero memory copy routine when the SIParser refactor is done, but these optimizations will still be useful for when we need to clone tables.