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

Large files opened with syntect plugin enabled causes flood of useless update ops #1269

Open
2 tasks done
bvinc opened this issue May 25, 2020 · 1 comment
Open
2 tasks done

Comments

@bvinc
Copy link
Contributor

bvinc commented May 25, 2020

Xi-Editor Issue Template

  • I have searched existing issues and could not find my issue.
  • I have studied the documentation.

For example, I'm using this file as my large text file.
https://norvig.com/big.txt

When I open this file, which is recognized correctly as plain text, and is 128457 lines long, the xi backend floods the frontend with 12847 notifications that all look like the following:

{"method": "update", "params":{"update":{"annotations":[{"n":1,"payloads":null,"ranges":[[0,0,0,0]],"type":"selection"}],"ops":[{"ln":1,"n":128458,"op":"copy"}],"pristine":true},"view_id":"view-id-5"}}

The notification requests do not appear if the syntect plugin is not installed.

I would not expect the backend to flood the frontend with thousands of expensive "copy" notifications.

I assume this is probably the cause of #497.

@Cogitri
Copy link
Member

Cogitri commented May 26, 2020

Hey,

yeah, right now style updates are coupled with the text updates which is problematic. It'd be nice if style updates were split from text updates, so:

  1. Not as much data to send via RPC
  2. Frontends can prioritize getting text into the cache over style

BTW, since you're back now: I've forked gxi quite a while ago and made Tau out of it: https://gitlab.gnome.org/World/Tau

Maybe you want to check it out and we can collaborate :)

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

2 participants