You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
This diff improves the performance of LSP requests by moving the perf logging `complete` function to after the LSP response has been returned to VSCode. The `complete` function takes ~100ms to run (>90% of our response time) which seems due to serializing the result and actually logging. By moving the `complete` call to after the LSP response, we improve the response time for LSP requests outside of GraphQL, where we do no other processing, from >100ms to ~15ms.
Note that this changes the time printed to the console of the "lsp_message" event. However, this time doesn't actually seem to log to scuba and all the other logged event times are the same.
This investigation was originally kicked off as the Flow team mentioned that the Relay response for go-to-def was blocking the Flow go-to-def event, which only took ~20ms. With this improvement, we should be complete before the Flow request returns.
This diff improves the performance of LSP requests by moving the perf logging `complete` function to after the LSP response has been returned to VSCode. The `complete` function takes >90% of our response time which seems due to serializing the result and actually logging. By moving the `complete` call to after the LSP response, we improve the response time for LSP requests outside of GraphQL, where we do no other processing, by ~90%.
Note that this changes the time printed to the console of the "lsp_message" event. However, this time doesn't actually seem to log to scuba and all the other logged event times are the same.
This investigation was originally kicked off as the Flow team mentioned that the Relay response for go-to-def was blocking the Flow go-to-def event. With this improvement, we should be complete before the Flow request returns.
Reviewed By: tyao1
Differential Revision: D55510170
fbshipit-source-id: 543bc1f4a3d1740be0ebafeb555caf0c04aa5801
0 commit comments