OmniSharp / omnisharp-roslyn

OmniSharp server (HTTP, STDIO) based on Roslyn workspaces
MIT License
1.79k stars 420 forks source link

Accelerate first request #842

Open Meliodas18 opened 7 years ago

Meliodas18 commented 7 years ago

When I tested the server, I've noticed that the first request is always longer the the other request. For instance, I have made a gotodefinition on a token which requires more than 1600ms to be processed by the server. I have made the gotodefinition on the same token but after another request and it takes only 10ms to be processed by the server. I think it could be great to reduce this "first request" time.

DustinCampbell commented 7 years ago

This can be challenging for larger solutions/projects. The problem is that files are not necessarily parsed and analyzed up front because that can be very expensive. So, the first hit ends up taking a first hit as the necessary projects and files are parsed and analyzed.