Editor: very slow response when editing big one-line file

Here you can report bugs found in Far Manager.
Locked
pp
Posts: 25
Joined: Wed Mar 23, 2005 1:54 pm
Location: Czech Republic
Contact:

Editor: very slow response when editing big one-line file

Post by pp » Mon Oct 15, 2007 8:56 am

Hi all,

when i try to edit (F4) file which is very long and contains no line ends (tested with 2844 KB long one), editor's response is very slow. Opening a file took about 3 minutes. After pressing "right arrow", cursor didn't move for another 3 minutes, then i've killed Far. CPU load was all the time 90-100%.

Is this behavior normal? (having files with such long rows is not normal, i know :sorry: )

Tested without plugins, version 1.71 alpha (mix based on build 2272).

User avatar
t-rex
Admin
Posts: 417
Joined: Sun Mar 20, 2005 6:10 pm
Location: Ashdod
Contact:

Post by t-rex » Tue Oct 16, 2007 11:45 am

Found the bottleneck, will see what I can do.

User avatar
t-rex
Admin
Posts: 417
Joined: Sun Mar 20, 2005 6:10 pm
Location: Ashdod
Contact:

Post by t-rex » Sat Oct 20, 2007 7:08 pm

Well, rewrote the drawing function of the editor, now it's fast even with very long lines (at least when colorer is not used, but even then cursor will still move relatively fast).

http://farmanager.com/farbugs/Far.Edito ... UpTest.rar

P.S. Test it out, it might create other display bugs in the editor.

pp
Posts: 25
Joined: Wed Mar 23, 2005 1:54 pm
Location: Czech Republic
Contact:

Post by pp » Mon Oct 22, 2007 7:24 am

Hi t-rex,

new version is really fast: opening time decreased from 3 minutes to 8 seconds (with "normal" line-ended 3 MB files it is less than 1 second) and editing works nearly as fast as in "normal" file. Thanks.

With Colorer opening the file is still slow (1 minute), but moving and editing is at least usable now. I suppose bottleneck is now hidden in the plugin, isn't it?

One more wish: would it be possible to break opening a file by Esc in the same way like you can interrupt e. g. copying a file?

I didn't find any display bugs.

User avatar
t-rex
Admin
Posts: 417
Joined: Sun Mar 20, 2005 6:10 pm
Location: Ashdod
Contact:

Post by t-rex » Mon Oct 22, 2007 8:03 am

pp
Opening a file (reading it) is breakable, you can see it on large files (200MB), here the delay happens after the file was read and in the colorer plugin so you should ask the author of colorer for a break key.

Locked