Comment #7 on issue 265 by m.niloc: Slow pasting
http://code.google.com/p/yi-editor/issues/detail?id=265

 From a quick strace, emacs and vim just read in from the terminal and treat  
the input
as though it were typed. Emacs will read all available keyboard input using  
an
FIONREAD ioctl, but this is just an implementation difference.

In vim, if you :set ai, pasted code will get reindented. You can :set  
paste, but this
just disables autoindent. This shows that Vim processes each pasted key as  
if it were
typed.

If you have the rough equivalent (define-key global-map (kbd "RET")
'newline-and-indent) in .emacs, pasted code will get re-indented. Emacs has  
nicer
auto-indentation so doesn't mess up pastes like vim, but it's still  
processing each
key as though it were typed.


The attached simulates pasting LaTeX in fast-latex mode. This takes 13.7s  
for me,
while the same in fundamental mode takes about 9.3s. fast-latex and latex  
take the
same time. After commenting out prepAction, both times are under 1 second.

Attachments:
        HackerMain.hs  1.1 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel
-~----------~----~----~----~------~----~------~--~---

Reply via email to