fpco / ide-backend

ide-backend drives the GHC API to build, query, and run your code
120 stars 17 forks source link

Speed up type info grabbing #203

Open snoyberg opened 10 years ago

snoyberg commented 10 years ago

This is not an urgent issue, filing now after discussing with Duncan.

Currently, in-the-IDE is a bit slow since returning compilation results blocks on grabbing type info. In the past, we worked around this by running multiple IdeSessions in parallel. However, this is memory-inefficient, and quite error prone. With the forkProcess changes, we've moved back to a single IdeSession.

So the request is to find ways to either speed up type info grabbing, or to do type info grabbing in parallel with compilation.

One idea we had on our side (possibly completely incorrect) is that an interval map may be a slow data structure to build up, and that a flat data structure (like a Vector) may be faster. This isn't based on any actual data, pure speculation.