XVimProject / XVim2

Vim key-bindings for Xcode 9
MIT License
2.31k stars 181 forks source link

`h` and `l` move cursor operation performance issue on latest develop branch build. #372

Closed r-plus closed 3 years ago

r-plus commented 3 years ago

Hi @pebble8888

today I found h and l move cursor to left and right operation performance issue when I build latest develop branch build. master branch is no problem so ~recently two~ latest NSTextStorage migrate to swift commit are the cause.

This is the screencast when I long press h and l key.

develop https://github.com/XVimProject/XVim2/commit/e58dd45e3cc6e88e8a86dbf534e538e2cdc513bd

https://user-images.githubusercontent.com/425216/115114660-711f8280-9fcb-11eb-97e5-429014c765ff.mov

master https://github.com/XVimProject/XVim2/commit/1c7c3762958b75e68f1e18a3f17fb10b762bf336

https://user-images.githubusercontent.com/425216/115114673-809ecb80-9fcb-11eb-8fd6-11799be7b5eb.mov

r-plus commented 3 years ago

0fd20be6cfaf614fc8b70c8f570c5738d5fe61a1 commit point is ok so cause is https://github.com/XVimProject/XVim2/commit/e58dd45e3cc6e88e8a86dbf534e538e2cdc513bd text storage commit.

r-plus commented 3 years ago

hmm, https://github.com/XVimProject/XVim2/commit/e58dd45e3cc6e88e8a86dbf534e538e2cdc513bd commit contains behavior change able diff between Swift.String.count and -[NSString length]

I commented to that commit's page.

r-plus commented 3 years ago