1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 04:07:34 +00:00

AK+LibWeb: Use segmented vector to store commands in RecordingPainter

Using a vector to represent a list of painting commands results in many
reallocations, especially on pages with a lot of content.

This change addresses it by introducing a SegmentedVector, which allows
fast appending by representing a list as a sequence of fixed-size
vectors. Currently, this new data structure supports only the
operations used in RecordingPainter, which are appending and iterating.
This commit is contained in:
Aliaksandr Kalenik 2023-12-30 20:07:29 +01:00 committed by Andreas Kling
parent 97f676dbf2
commit e394971209
4 changed files with 99 additions and 1 deletions

View file

@ -63,6 +63,7 @@ set(AK_TEST_SOURCES
TestQuickSort.cpp
TestRedBlackTree.cpp
TestRefPtr.cpp
TestSegmentedVector.cpp
TestSIMD.cpp
TestSinglyLinkedList.cpp
TestSlugify.cpp