-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the performance and accuracy #24
Comments
It hasn't stopped, I am still using this package - I've just been satisfied with the results/performance.
SourceKittenDaemon does use SourceKitten as the backend, @mitsuse would be great to have your input here on the decision not to use SourcekittenDaemon and how you achieved the performance of your neovim package =D
You're more than welcome to :) If it turns out to be better I will probably switch as well. I don't think it's very feasible for company-sourcekit to switch from using SourceKittenDaemon since it will pretty much surmount to a re-write. Also, performance could be a matter of upgrading SourceKitten but looking at their changelog doesn't seem like there are any performance improvements to completion. |
The 400k+ issue is still occurred often with endless output writing to At first, I think we should compare this package with Autocomplete-swift to find out what we could achieve to improve the results/performance. @mitsuse is appropriate and welcome to do this. I will try to make an experiment on using SourceKitten as the back-end a few days later. And I'm glad to see continuous improvement aiming at results/performance and more people are joined to make a contribution :) |
@galeo Hi. I don't know the implementation of company-sourcekit and whether there are problems on performance, but I can tell about the implementation of autocomplete-swift on the point of completion accuracy. My plugin for Neovim decides the offset of completion as follow:
The second one seems to be related to this issue. In addition, I think the difference of back-end (SourceKitten or SourceKittenDaemon) is not related to accuracy discussed here as long as I read the source of SourceKittenDaemon few months ago. |
I'm really excited to see an issue like this. I'd love to get more info from @nathankot on what can be done to improve performance. From what I've read it seems like the only way we can get close/improve on Xcode is by caching results from sourcekit? Maybe sourcekittendaemon would be a good place to add that layer? What are your thoughts @nathankot ? I've been casually researching this for a few days. Some things I found which may (or may not) be useful:
This stuff is a bit over my head - I've never taken a compiler course, etc. But I'd love to help work on this and it looks like other people are interested too! |
Thanks for your insight, I've added a28ac48 which addresses the byte-offset (wasn't using byte length of the prefix.) I did some digging and it seems like the biggest bottleneck for company-sourcekit is actually the http response results being written into the Writing response results to a buffer is inevitable in emacs I think, so the question becomes - how do we speed this up? I'm working on a new branch I would say the second priority here would be to cache word and framework completions, you're right @rudedogg this could be a sourcekittendaemon layer. Depending on how fast we can get the output and JSON parse it, this may or may not be necessary :) |
Hi @nathankot, I have tried to use deferred.el to get the query results asynchronously. It just works well and the |
@galeo not sure how much But send in the PR and I can take a look :) |
Please have a look at the PR #25 :) |
@galeo I've taken another look and refactored the code, fixed a few things that will hopefully help with performance. Please see the 0.2.0 release notes for full details - and let me know how it goes :) |
Hi @nathankot I pulled the latest code and it works well except when it tries to send the first query request to SourceKittenDaemon, it outputs the following messages:
And I personally think the message [sourcekit] got query response should better be silenced when Another problem I noticed recently: when typed fast, it may establish lots of query requests and it suffers a serious delay to get the response results. I experimented to improve the accuracy by tweaking the prefix and making company-sourcekit work with other backends, eg. company-keywords, company-yasnippet etc. I don't have enough time on this and there is only a little progress. The query results should better be filtered and cached with a flexible and robust mechanism. I see you've added a string match filter to the query result and it could be a good beginning. Thanks :) |
@galeo did you achieve any progress with this? |
Emacs master now has JSON encoding in C by the way. Not sure how much it'll help this problem. |
I don't know if the development of this package is stopped. The last commit date on master branch was 7 months ago (Jun 5, 2016). Is there a change to improve the performance and accuracy?
There is a NeoVim plugin called Autocomplete-swift, which just uses SourceKitten as its back-end. When I tried to code with company-sourcekit(latest) in emacs(25.1.1) like the gif screenshot in its README, it went to totally mass.
As the above picture shows, when type
var|
, the completion list appeared, then type SPACE, it got completed like this:Going on, type
String|
,then type SPACE, got this
... ...
I use the latest SourceKittenDaemon code compiled with Sourcekitten 0.15.0 and Xcode 8.2 a few days ago.
It seems that SourceKittenDaemon is not actively developed either, will it improve the performance and accuracy by just using SourceKitten as the back-end?
Or could we port Autocomplete-swift into emacs?
Thanks.
The text was updated successfully, but these errors were encountered: