Snowflyt / typora-copilot

GitHub Copilot plugin for Typora on both Windows, macOS and Linux, provided through Copilot.vim.
https://github.com/Snowflyt/typora-copilot
MIT License
70 stars 5 forks source link

slow down Typora response #9

Open qigtang opened 4 months ago

qigtang commented 4 months ago

When typora-copilot is enabled, the Typora response seems be sluggish. For example, the time from a key is struck, to the character showing up in Typora is significant slower when enabling copilot.

Snowflyt commented 3 months ago

This is a long-term existent problem with the plugin. Typora-copilot currently reads the whole document and ask Copilot for completion, which should lead Typora slow down when your document is large.

I plan to solve the problem in later versions, but the rendering mechanism of Typora is very complicated, so finding a reliable way to partially read only the changed part in the document can be hard. I don’t have enough time to solve the problem recently, so it may take months for me to finally find a time to fix the problem.