ZIm/crates
Max Brunsfeld dcc2cd8dff
Optimize two slow code paths (#2728)
Linear:
https://linear.app/zed-industries/issue/Z-2578/zed-launches-very-slow-for-user

I was searching for the cause of a slow startup time reported in the
above issue, and I don't think I found it, but I did find two very
noticeable slow code paths while profiling, and fixed them.

###  Notes

1. When starting the JSON language server, we provide it with a JSON
schema for our settings. For the `theme` setting, the JSON schema needs
to read all of the themes in the registry, to generate a list of valid
theme names. Previously, as part of this, we were deserializing each
theme from JSON, which took a lot of CPU. Now, we don't do that.
2. When an FS event occurs within a git repository, we reload the git
status for all entries in that git repository. Previously, we did that
via a separate `libgit2` call per FS entry (including ignored entries,
so many thousands in the case of the `zed` repo). Now we do one
`libgit2` call, asking for all of the statuses. Git carries an index of
all of the files with statuses, so this is fast.

Release Notes:

- Improved the the performance of starting up a  JSON language server.
- Improved the performance of handling changes to git repositories, such
as changing branches or committing.
2023-07-14 14:38:55 -07:00
..
activity_indicator Merge branch 'main' into fix-broken-lsp-installations 2023-06-28 16:46:06 -04:00
ai Merge branch 'main' into update-assistant-styles 2023-07-10 10:22:18 -04:00
audio Update collaboration sounds, add sounds to screensharing 2023-07-04 16:18:42 -04:00
auto_update Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
breadcrumbs Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
call Fix screen sharing panic introduced by call events 2023-07-12 16:12:07 -04:00
cli Prevent duplicate instances by coordinating via a socket 2023-07-07 14:19:44 -04:00
client Add call events 2023-07-11 13:58:55 -04:00
clock Fixed a bug where buffer saved clocks would desynchronize in rare execution paths 2023-06-07 16:10:45 -07:00
collab feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
collab_ui feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
collections Move command palette filter into collections crate 2023-03-28 20:13:17 -07:00
command_palette feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
context_menu Introduce a WindowContext::focus method that implies the window id 2023-07-05 09:39:04 +02:00
copilot Merge branch 'main' into fix-broken-lsp-installations 2023-06-28 16:46:06 -04:00
copilot_button Remove on_click_out handler from context menu 2023-06-29 17:10:51 -07:00
db Use different port and handshake for different release channels 2023-07-07 14:20:39 -04:00
diagnostics Split Interactive into Interactive and Toggleable (#2628) 2023-06-21 15:03:08 -04:00
drag_and_drop Prevent some cases of clipping icons due to pixel coord rounding 2023-05-08 11:42:00 -04:00
editor feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
feedback Preserve serach index for multicaret selection editor events 2023-07-14 14:47:12 +03:00
file_finder feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
fs Perform only one git statuses call when reloading a git repo after it changes 2023-07-14 14:29:22 -07:00
fsevent 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
fuzzy remove commented line 2023-02-27 12:06:10 -08:00
git Clean up final remaining code paths calling old diff update method 2023-05-25 14:41:09 -04:00
go_to_line Add Modal::has_focus and introduce a ModalHandle trait object 2023-07-05 09:39:56 +02:00
gpui Add the math for pane resizing 2023-07-12 22:35:51 -07:00
gpui_macros Add a derive macro for Element 2023-06-25 07:51:50 -06:00
install_cli 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
journal Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
language Add randomized syntax map test with elixir within heex within elixir 2023-07-14 09:58:34 -07:00
language_selector feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
language_tools Preserve serach index for multicaret selection editor events 2023-07-14 14:47:12 +03:00
live_kit_client chore: Replace lazy_static Mutex with const. (#2693) 2023-07-07 15:07:12 +02:00
live_kit_server 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
lsp Remove a flacky test, fix the failing one 2023-06-29 22:45:04 +03:00
media Update rust-bindgen dev-dependencies 2023-06-04 23:34:22 -04:00
menu feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
node_runtime Reinstall Node whenever a NodeRuntime operation has serious error 2023-06-28 16:43:45 -04:00
outline feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
picker feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
plugin 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
plugin_macros Fix typos 2023-06-02 22:02:19 -04:00
plugin_runtime Fix typos 2023-06-02 22:02:19 -04:00
project Perform only one git statuses call when reloading a git repo after it changes 2023-07-14 14:29:22 -07:00
project_panel feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
project_symbols feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
recent_projects feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
rope Simplify InlayMap::splice interface 2023-06-29 22:25:49 +03:00
rpc Post-rebase fixes 2023-06-29 22:39:33 +03:00
search Add a new button for the action 2023-07-14 17:32:10 +03:00
settings Accept null as a valid action, to disable a keystroke 2023-07-04 21:11:28 +03:00
snippet 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
sqlez Fix typos 2023-06-02 22:02:19 -04:00
sqlez_macros 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
staff_mode 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
sum_tree Account for inlay biases when clipping a point 2023-06-29 22:25:50 +03:00
terminal Allow selecting all search matches in buffer 2023-07-14 14:47:12 +03:00
terminal_view Preserve serach index for multicaret selection editor events 2023-07-14 14:47:12 +03:00
text Remove excessive hint update queries 2023-06-30 22:03:21 +03:00
theme Optimize two slow code paths (#2728) 2023-07-14 14:38:55 -07:00
theme_selector feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
util Merge branch 'main' of github.com:zed-industries/zed into vector_store 2023-06-30 09:58:13 -04:00
vcs_menu feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
vector_store feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
vim vim: { } to navigate by paragraph (#2668) 2023-07-07 14:59:06 -06:00
welcome feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
workspace fix(flexes): reset flexes when collapsing axis 2023-07-14 21:49:33 +02:00
xtask Fixup xtask compilation 2023-06-22 18:06:52 +02:00
zed feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
zed-actions Add Sign in button for an unregistered user 2023-06-15 22:05:43 -07:00