Dhanus3133 / Leetbuddy.nvim

Solve Leetcode problems within Neovim 🔥
MIT License
139 stars 15 forks source link

Extremely laggy #12

Open advilm opened 1 year ago

advilm commented 1 year ago

I wanted to try using this plugin but it is lagging a lot (like 3-5 seconds after every keypress).

I thought it might be somehow conflicting with one of the other plugins I had, but the issue still occurred with a minimal config.

I gave my minimal config to a friend and this project ran fine for them. Any idea how I would go about finding the issue and fixing it?

Thank you

Dhanus3133 commented 1 year ago

Can you give me some more information of where it is lagging and what you had tried to do. (It can be abit laggy only when you test or submit the code for like some seconds)

advilm commented 1 year ago

It seems to be lagging everywhere. Here's a video of how it lags when showing questions:

https://github.com/Dhanus3133/Leetbuddy.nvim/assets/40906275/54dbfafc-7ef8-46d1-860c-c8ed26ae7680

Dhanus3133 commented 1 year ago

The lag is because of the delay in response for the API request happening in the background to Leetcode API. I am unsure for the reasons behind it. Tried switching the network?

orhnk commented 1 year ago

The lag is because of the delay in response for the API request happening in the background to Leetcode API. I am unsure for the reasons behind it. Tried switching the network?

I do face the same issue.

Nevertheless That is a plugin issue. It needs performance optimizations (e.g cacheing would be very nice)

Lag DEMO:

https://github.com/Dhanus3133/Leetbuddy.nvim/assets/101834410/56ad4e09-20c9-45b7-8ae4-ccc79130e749