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

Editing slows significantly on larger documents #721

Open
joshuafcole opened this issue Jan 5, 2017 · 2 comments
Open

Editing slows significantly on larger documents #721

joshuafcole opened this issue Jan 5, 2017 · 2 comments
Labels

Comments

@joshuafcole
Copy link
Contributor

This is almost entirely due to CM.indexFromPos and CM.posFromIndex, calls to which (aggregated from the various places they happen) account for somewhere between half to three quarters of the execution time of a continuous typing profile. It's pretty clear these aren't meant to be on a hot path, but they're currently on basically every editing hot path due to our half-baked projectional span mapping technique. We either need to bite the bullet and do a more proper incremental update of the document or give up on the mapping and find a faster approach to preserving state in a meaningful way. In the interim, caching values until the document is dirtied would probably help, but it's likely not worth the trouble vs just going all in on one of the proper fixes.

@cmontella
Copy link
Contributor

For reference, this was issue was noticed when working with the following Eve program: https://github.com/witheve/mamarob/blob/54b79c57bdf8294d4ace3004e9227f8445167325/food-truck.eve.md

@joshuafcole
Copy link
Contributor Author

Mitigated somewhat by #731

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

No branches or pull requests

2 participants