UI hangs for long times on larger texts
See original GitHub issueWhen working with bigger files, the editor hangs for large amount of times each time the tokens generated by the lexer are invalidated (so on each paste, text insertion/removal, …).
As an example I used this reasonably sized json file: http://www.json-generator.com/api/json/get/cfAolJlfma?indent=2 (~85kb)
On my macbook with 6-Core i7 on 2.6ghz this file hangs the UI for around 30 seconds when pasting it into boop. This is caused by the json label regex lexing. When I disable line 70 in BoopLexer.swift
the time to paste this file is around 1 second. When I disable all lexers that use the quoteLookahead
regex pattern, it’s almost instant.
Since I don’t know a lot about swift, savannakit and it’s lexers, I’m opening an issue. Maybe with some pointers to how we could solve this, I might be able to work this into a PR fixing it 😃
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (4 by maintainers)
1.3.0 is now under review by Apple, should be released in the next couple days! Closing this issue, feel free to reopen if needed.
@abhi21git As I said, it will be available in the next couple of days.