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

slow down Typora response #9

Open
qigtang opened this issue Jul 26, 2024 · 2 comments
Open

slow down Typora response #9

qigtang opened this issue Jul 26, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@qigtang
Copy link

qigtang commented Jul 26, 2024

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
Copy link
Owner

Snowflyt commented Aug 1, 2024

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.

@Snowflyt Snowflyt added the enhancement New feature or request label Aug 1, 2024
@Snowflyt Snowflyt pinned this issue Aug 1, 2024
@Snowflyt
Copy link
Owner

Snowflyt commented Jan 1, 2025

After an overhaul refactor in v0.3.2 (4140bec), I believe this issue has been significantly alleviated. During the refactor, I discovered several cases where event listeners were not properly removed, leading to increasing memory leaks as completion requests grew. These memory leaks have been largely resolved.

Thank you for your patience, and I hope this update improves your experience! :)

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

No branches or pull requests

2 participants