Editing slows significantly on larger documents #721

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

Projects

None yet

2 participants

@joshuafcole
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.

@joshuafcole joshuafcole added the editor label Jan 5, 2017
@cmontella
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
Contributor

Mitigated somewhat by #731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment