Skip to content
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

Lagging interface with company-mode #6

Open
jandamm opened this issue Nov 10, 2019 · 6 comments
Open

Lagging interface with company-mode #6

jandamm opened this issue Nov 10, 2019 · 6 comments

Comments

@jandamm
Copy link

jandamm commented Nov 10, 2019

I'm using lsp-sourcekit with company-mode as part of an Doom Emacs configuration.

When I start typing and company wants to present auto completion, the interface freezes for about a second. Then I'm presented with an extremely long list of auto completion possibilities:

Screen Shot 2019-11-10 at 21 52 48

This only happens when I start typing. There is no issue, when I've got the type written out and just look for members of the type.
Abc. is working fine and presents the init, Type and self.

@danielmartin
Copy link
Collaborator

Thanks for the report. Do you have a sample project where this behavior is reproducible? Can you post the output of running M-x company-diag?

@jandamm
Copy link
Author

jandamm commented Nov 11, 2019

For me it happens in Login/Login.swift in https://github.com/jandamm/gitlab-ci-viewer/tree/test.

I'll run company-diag later 👍

@jandamm
Copy link
Author

jandamm commented Nov 11, 2019

Emacs 26.3 (x86_64-apple-darwin18.7.0) of 2019-09-05 on Mac
Company 0.9.10

company-backends: (company-lsp company-yasnippet)

Used backend: company-lsp
Major mode: swift-mode
Prefix: stop
Completions: none

@danielmartin
Copy link
Collaborator

@jandamm, SourceKit-LSP has just implemented server-side filtering of completion results (see swiftlang/sourcekit-lsp#298). This should improve performance, specially on Emacs <27, where JSON serialisation is done in Emacs Lisp code.

Could you compile a SourceKit-LSP toolchain from top of tree and see if completion performance is better? Thanks.

@jandamm
Copy link
Author

jandamm commented Jul 29, 2020

Hey @danielmartin, thanks for the follow up.
I've switched back to Neovim in the meantime. Having some performance issues with sourcekit-lsp there as well.
But they improved over the last months, so I'd guess company mode has gotten better as well :)

@blandinw
Copy link

blandinw commented Nov 8, 2020

For posterity, building sourcekit-lsp removed the lag for me.

git clone https://github.com/apple/sourcekit-lsp.git
cd sourcekit-lsp
export TOOLCHAINS=swift
swift package update
swift build -c release
ls -l .build/release/sourcekit-lsp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants