Commit 293a2ac
Update loader progress on percent change only
Summary:
A project can have thousands of files. We report loader progress as the VFS loader loads these, presented on the VS Code status bar as a percentage figure.
This means that we send multiple duplicate messages while loading, as the percentage number changes relatively slowly compared to the number of files loaded.
This onslaught of messages can however overload the LSP client, resulting in a status bar that does not accurately reflect the current ELP loading state as it updates from the backlog in a received queue of messages.
## This diff
This diff reduces the number of messages sent, without losing any information, by keeping track of the current percentage value, and only sending a progress message when it changes.
Reviewed By: TheGeorge
Differential Revision: D84140378
fbshipit-source-id: 13fd4e39b87010c70b692abd7aeb15beddef2dbd1 parent 98bba7a commit 293a2ac
2 files changed
+17
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
957 | 957 | | |
958 | 958 | | |
959 | 959 | | |
960 | | - | |
| 960 | + | |
961 | 961 | | |
962 | 962 | | |
963 | 963 | | |
| |||
1988 | 1988 | | |
1989 | 1989 | | |
1990 | 1990 | | |
1991 | | - | |
| 1991 | + | |
1992 | 1992 | | |
1993 | 1993 | | |
1994 | 1994 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
202 | | - | |
| 204 | + | |
203 | 205 | | |
204 | 206 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
214 | 219 | | |
215 | 220 | | |
216 | 221 | | |
| |||
0 commit comments