Solargraph: /suggest is relatively slow

Created on 13 Feb 2018  路  5Comments  路  Source: castwide/solargraph

I was trying to figure of why the completion requests takes roughly 700ms. Was thinking if HTTP POST has a lot of overhead and switching to a different transport method might bright down that value.

To my surprise CodeMap::suggest_at() itself takes roughly 450 ms.

Wondering if there are ongoing efforts to bring that value down?

Most helpful comment

The upcoming support for language server protocol will include a stdio transport. Early tests are noticeably faster.

Improvements to CodeMap, ApiMap, and YardMap are an ongoing concern. Among the candidates to improve performance:

  • Reduce the amount of source parsing and map processing required to handle individual requests
  • Improve map caches
  • Refresh maps in concurrent threads

All 5 comments

The upcoming support for language server protocol will include a stdio transport. Early tests are noticeably faster.

Improvements to CodeMap, ApiMap, and YardMap are an ongoing concern. Among the candidates to improve performance:

  • Reduce the amount of source parsing and map processing required to handle individual requests
  • Improve map caches
  • Refresh maps in concurrent threads

@castwide Is there a project TODO list or a roadmap tracked somewhere?

@patilarpith There's a public project in Pivotal Tracker: https://www.pivotaltracker.com/n/projects/1970245

The switch to LSP and improvements to the internal maps should significantly improve the speed of completion results in the current gem.

Yes! I can see the change from sub 350-550ms completion response time to 120ms response time between (v0.17.3) vs (v0.21.1)

Closing this as the underlying issue is now resolved

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bry-guy picture bry-guy  路  3Comments

dewetblomerus picture dewetblomerus  路  5Comments

cuongn265 picture cuongn265  路  3Comments

wh1le picture wh1le  路  5Comments

dansdantas picture dansdantas  路  5Comments