Files
oak-gpui/crates
Piotr Osiewicz eb7b5a7131 project panel: Improve performance in worktrees with lots of files. (#12980)
When working on a repro for a different issue that involved a worktree
with lots of files (100k to be precise), UI became pretty unresponsive.
I pinned it down to us repeatedly preparing a HashSet of all paths in
the currently-scrolled-to worktree, once per each entry in the range
passed to for_each_visible_range (which is e.g. called during
rendering).

This PR makes that hashing happen just once per worktree. Additionally,
we no longer iterate over (potentially) all entries in a given worktree
when calculating the depth of a given entry.

Note that we could probably be smarter about this still; instead of
recalculating the hashset per each call to for_each_visible_entry, we
could do it whenever we update entries in the project panel. However,
with this PR I wanted to get a quick bang for a small buck; I'm pretty
confident in the change as is, it is relatively straightforward and
messing with worktree updates is more involved.



Release Notes:

- Improvement performance of project panel in large worktrees
2024-06-13 14:20:38 +02:00
..
2024-05-29 18:06:45 -07:00
2024-05-29 18:06:45 -07:00
2024-04-23 13:31:21 -04:00
2024-03-28 18:32:11 +01:00
2024-05-29 18:06:45 -07:00
2024-06-03 22:17:10 -06:00
2024-04-30 23:31:59 -06:00
2024-06-12 23:22:52 +03:00
2024-06-12 23:22:52 +03:00
2024-05-10 15:50:20 -06:00
2024-03-11 10:45:57 +01:00
2024-03-26 16:10:09 -07:00
2024-05-23 15:50:59 +02:00
2024-05-29 18:06:45 -07:00
2024-04-15 14:21:52 +02:00
2024-06-12 23:22:52 +03:00