Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Performance Issue #1

Closed
litao91 opened this issue Mar 28, 2022 · 3 comments
Closed

Performance Issue #1

litao91 opened this issue Mar 28, 2022 · 3 comments

Comments

@litao91
Copy link

litao91 commented Mar 28, 2022

Hi,
Have you ever tested the performance of mlua? From my experience, it's really slow to cross the boundary between the lua part and the rust part (i.e., calling a rust function from lua or calling a lua function from rust). I'm afraid that the performance will be an issue in the future.

Thanks

@noib3
Copy link
Owner

noib3 commented Mar 28, 2022

The mlua crate is mostly used to interface with the neovim api to handle the UI: creating floating windows, moving them, filling their buffers, etc. This is all already implemented and I haven't found performance to be a problem, everything feels instantaneous.

However I can see how this could become a problem if a completion source heavily relies on the api, as that cost would be payed every keystroke.

The long term goal is to drop mlua entirely once Neovim stabilizes and exposes libnvim to directly talk to the C api (relevant issue here). For now there's not a lot that can be done since Lua is the only way to interact with Neovim.

@sandangel
Copy link

@noib3 hi, regardless mlua dependency, I would love to see a demo to compare with coq_nvim tho, is that something we can only have after adding completion source?

@noib3
Copy link
Owner

noib3 commented Mar 31, 2022

@sandangel I plan to add a CompleetStats command showing infos about the performance of each source but yes, we gotta add at least one real source first.

Repository owner locked and limited conversation to collaborators Apr 2, 2022
@noib3 noib3 converted this issue into discussion #9 Apr 2, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants