Commit 8170e66
authored
Don't register ability to hover, request colors, etc… more than once (#1378)
We're currently re-registering "common" capabilities per workspace
folder. This causes VSCode to make multiple requests to the server for
things like hover causing higher CPU usage. This then results multiple
hovers being displayed. What's worse is that for some scenarios where
the server has to internally do a restart the old registrations weren't
getting disposed of because of a race condition when calling it
concurrently for multiple folders.
I've done two things to address this:
- Common capability registration will only happen after all project
folders have been initialized — hopefully this doesn't cause any
problems (though if it does it's revealing a bigger underlying one)
- Common capabilities will be explicitly disposed before registering
again
This should mean that this only happens one time per server
initialization.
Fixes #13711 parent fa87e8a commit 8170e66
1 file changed
+24
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
177 | 181 | | |
178 | 182 | | |
179 | 183 | | |
| |||
628 | 632 | | |
629 | 633 | | |
630 | 634 | | |
631 | | - | |
632 | | - | |
633 | 635 | | |
634 | 636 | | |
635 | 637 | | |
| |||
896 | 898 | | |
897 | 899 | | |
898 | 900 | | |
| 901 | + | |
899 | 902 | | |
900 | 903 | | |
901 | 904 | | |
| |||
907 | 910 | | |
908 | 911 | | |
909 | 912 | | |
910 | | - | |
| 913 | + | |
911 | 914 | | |
912 | 915 | | |
913 | 916 | | |
| |||
938 | 941 | | |
939 | 942 | | |
940 | 943 | | |
941 | | - | |
942 | | - | |
| 944 | + | |
| 945 | + | |
943 | 946 | | |
944 | 947 | | |
945 | 948 | | |
946 | 949 | | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
947 | 965 | | |
948 | 966 | | |
949 | 967 | | |
| |||
1134 | 1152 | | |
1135 | 1153 | | |
1136 | 1154 | | |
1137 | | - | |
| 1155 | + | |
1138 | 1156 | | |
1139 | 1157 | | |
1140 | 1158 | | |
| |||
0 commit comments