mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-24 03:59:09 +00:00
The evolution of UniqueStorage has been as follows: 1. It was created as UniqueStringStorage to ensure only one copy of each unique string is generated. Interested parties stored an index into a unique string list, rather than the string itself. Commits:f9e605397cand04e6b43f052. It became apparent that non-string structures could also be de- duplicated to reduce the size of libunicode.so. UniqueStringStorage was generalized to UniqueStorage for this purpose. Commit:d8e6beb14fIt's now also apparent that there's heavy duplication of lists of structures. For example, the NumberFormat generator stores 4 lists of NumberFormat objects. In total, we currently generate nearly 2,000 lists of these objects, of which 275 are unique. This change updates UniqueStorage to support storing lists. The only change is how the storage is generated - we generate each stored list individually, then an array storing spans of those lists.