mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
This commit makes `getOffsetGuard` and `getRangeGuard` faster by replacing O(n) algorithm with O(log(n)) algorithm. The previous approach used linear search to find the appropriate range marker that was a bottleneck on a workload with thousands of guarded blocks. Also, the guarded blocks were kept on hard references in an array. Preserving that required to adjust `keepIntervalOnWeakReference` method in the range marker tree to avoid collecting the guarded blocks by gc GitOrigin-RevId: f83e6d643846e805ee0dad864a1b09cb526ec323