Menu

#66 Typing is slow in 'large' files.

None
fixed
nobody
None
2013-05-04
2013-05-03
MikeDNC
No

Version: 5.4.2 RC7
OS version: Windows 7 Starter, SP1

.
The 'subject' says it all. And it makes no difference if the typing is at the end, beginning, or middle of the file.

But the size of and number of lines in the file seem to make a huge difference: As either of these increases, typing becomes steadily slower. They both seem to contribute; e.g., if I take a big source-file and put all characters on one line, then typing is about only half-as-slow (halfway to 'normal').

.
I knew this wasn't always the case, so I did some comparing with different versions, opening-up the same big(*) source file in each one:

slow in 5.4.2 RC7

a little faster but still slow in 5.2.0.2 RC8

a little faster but still slow in 5.1.1.1 RC3

noticably faster in 5.1.1.0 RC5

quite noticably faster in 5.1.1.0 RC1

normal for typing, pretty-good for undoing; in 5.0.0.7 RC2

normal for typing, pretty-good for undoing; in 5.0.0.6 RC4

normal for typing, pretty-good for undoing; in 5.0.0.6 RC1

normal for typing, pretty-good for undoing; in 5.0.0.5 RC12

normal for typing, pretty good for undoing; in 5.0.0.5 RC8

.


(*) "Big" or large means a 50-100 KB file, with 1-2K lines. Any smaller than that, and the slowdown is not as noticeable / much-more-tolerable.

.

Discussion

  • MikeDNC

    MikeDNC - 2013-05-03
     

    Last edit: MikeDNC 2013-05-03
  • MikeDNC

    MikeDNC - 2013-05-03
     

    Last edit: MikeDNC 2013-05-03
  • MikeDNC

    MikeDNC - 2013-05-03
     

    Last edit: MikeDNC 2013-05-03
  • MikeDNC

    MikeDNC - 2013-05-03
     

    Last edit: MikeDNC 2013-05-03
  • MikeDNC

    MikeDNC - 2013-05-03
     

    Last edit: MikeDNC 2013-05-03
  • MikeDNC

    MikeDNC - 2013-05-03
     

    Last edit: MikeDNC 2013-05-03
  • MikeDNC

    MikeDNC - 2013-05-03
     

    Last edit: MikeDNC 2013-05-03
  • MikeDNC

    MikeDNC - 2013-05-04
     

    Last edit: MikeDNC 2013-05-04
  • orwelldevcpp

    orwelldevcpp - 2013-05-04

    I'll be keeping a log here if you don't mind.

    • Big source files (cpp/c/h/...) get quite slow indeed.
    • If I rename a file to txt for example, all is fine.
    • If I manually disable code folding, everything is fine.
     
  • orwelldevcpp

    orwelldevcpp - 2013-05-04

    Rescanning for fold regions is an order of magnitude faster now.

     
  • MikeDNC

    MikeDNC - 2013-05-04

    Confirmed, much faster here!

    But where do I enable/disable code-folding? (I don't even see the folds appearing anywhere, though I seem to be affected by them being-calculated).

     

    Last edit: MikeDNC 2013-05-04
  • orwelldevcpp

    orwelldevcpp - 2013-05-04

    Are you sure you aren't seeing the folds in the gutter to the left? They're the white/red things shown in the screenshot.

     
  • orwelldevcpp

    orwelldevcpp - 2013-05-04
    • status: open --> fixed
     
  • MikeDNC

    MikeDNC - 2013-05-04

    I do see the code-folds now.. They are shown 'iff' the gutter is shown.

    1) However I don't notice any speed-increase (up to the speed of a *.txt file) when gutter&folds are hidden. It seems the folds are still being calculated, just not shown.


    2) Wouldn't it have to re-calculate only when the following things occur? :

    • adding or removing a line. Perhaps equivalently: inserting or deleting [CR,LF]
      characters.
    • inserting or deleting '{' or '}'.

    I've searched a bit, and those seem to be the only events that can ever cause the code-folds to change appearance. In that case, it could be as fast as .txt for most typing (no slowdown).

     

    Last edit: MikeDNC 2013-05-04

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.