Files
sousa-gecko/modules/libpref/test/gtest
Jens Stutte 5116a24b26 Bug 2049092 - Part 4: Prune empty CallbackTrie nodes on compaction. r=gstoll
Compact() removed dead callbacks but never removed the trie nodes that became
empty, so the trie grew without bound under pref-observer churn. Have the
compaction path walk to each removed callback's node recording the parent chain,
then drop nodes that end up with no callbacks and no children, bottom-up. Only
runs on the lazy idle Compact path, so notification and registration are
unaffected. Adds a PruneEmptyNodesOnChurn gtest that forces the idle sweep and
checks the node count returns to baseline.

Differential Revision: https://phabricator.services.mozilla.com/D307918
2026-06-23 05:40:33 +00:00
..
…