#4308 editor is VERY slow for large documents

1.x
open
nobody
None
5
2013-07-09
2013-05-09
Jim Michaels
No

I find notepad++ to be very full featured. I need that. I am hoping for speed improvements. currently with 6.3.2 it takes 15-20 seconds on an i7-3970x processor with 64GB on a document with 60k+ lines (it's probably a 2MB file) to

  • double-click on the search result
  • find anything
  • go to specific line with ctrl-g
  • ctrl-end (go to end of document)
  • any major movements

Discussion

  • Jim Michaels
    Jim Michaels
    2013-07-09

    with 6.4.1, it is now taking up to 5 minutes when I paste soemtimes. it is not consistent. I am working regularly with 5-7MB html documents, and this may be what is causing the problems in my case.

    it's not something I can attach or refer you to.

    I have another editor which is lightning fast at everything. however there are features in each editor I need to use that the other does not have which I need for particular tasks.

    if it's a fair distance from the cursor to where I am doing a ctrl-g to, or I am double-clicking on a line, or if I am pasting

         </div></div>
    

    tags which I have just cut from above a section to paste below to balance, the paste will usually cause a 1-5-minute delay.

    same 1-5-minute hang/delay when I type in sometimes. or if I hit Enter between taks like these:

           </div></div></div><div id='blah1'><div id='blah2'><div id='blah3'>
    

    these hang-delays are making my editing tasks nearly impossible.

     
  • Jim Michaels
    Jim Michaels
    2013-07-09

    I did a simple doubling-type of copy and paste of the following text, and it's taking minutes just to paste it. I am currently doubling 154284 lines, and I wonder if it's coming back.

         <div id='blah'><div id='blah2'><div id='blah3'>
         <p class=MsoNormal><sup><span style='line-height:
         115%'>blah
         </span></sup><span style='line-height:
         115%'>blah
         </span><sup><span style='line-height:
         115%'>blah
         </span></sup><span style='line-height:
         115%'>blah
         </span><sup><span style='line-height:
         115%'>blah
         </span></sup><span style='line-height:
         115%'>blah
         </span></p>
         </div></div></div></div><div id='blah'><div id='blah2'><div id='blah3'>
         <div id='z'><div id='abc'>
         <p class=MsoNormal><sup><span style='line-height:
         115%'>blah
         </span></sup><span style='line-height:
         115%'>blah
         </span><sup><span style='line-height:
         115%'>blah
         </span></sup><span style='line-height:
         115%'>blah
         </span><sup><span style='line-height:
         115%'>blah
         </span></sup><span style='line-height:
         115%'>blah
         </span></p>
         </div></div></div>
         </div></div>
    

    Notepad++: a free (GNU) source code editor:
    Notepad++: a free (GNU) source code editor
    has stopped working
    A problem caused the program to stop working correctly.
    Windows will close the program and notify you if a solution is available.
    the last paste was 154000 lines of this or so.

    the beginning of the document is:

        <!DOCTYPE html>
        <head>
        <title>5 minute paste</title>
        </head>
        <body>
        <div class=abc>
    

    and the end of the document is:

        </div>
        </body>
        </html>
    

    and this is just a test document. so essentially, the editor is SO SLOW windows 7 decided to kill it.
    beef up your editor's speed, and make it 64-bit. sure;y it can go a lot faster than it's going now - microsoft compilers are not known for speed.

    try thinking about your algorithms and tuning them.

    try compiling your code to optimize for speed. for gcc, -Ofast

    mingw-w64 is a gcc/gnu open source compiler which can make 64-bit code. use the personal builds by rubenvb.

           https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/
    
            https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/
    

    thanks.

    Note: it takes 1 second for npp to react for hitting Enter between between the div tags on my fast box. on any other line, it's instantaneous. I turned off spell checking and the indentation guide and neither of these seemed to affect that. this should not be so.

     
    Last edit: Jim Michaels 2013-07-13
  • Jim Michaels
    Jim Michaels
    2013-07-09

    take the "large file" I mentioned. at the END of the file (not the beginning, that only has 1 second delay, although this is still unacceptable) where you see the 3 blah div tags, type in (not paste)

           <div id='blah4'>
    

    this will generate a close div tag. there will be some unfortunate delay while the editor "thinks on it". do a shift-end shift-delete to highlight the closing div tag and cut it to clipboard. move to bottom where matching close tags are and paste there. there will be another unfortunate delay while npp "thinks on it".

    I suspect npp is repeatedly reading and writing the entire file zillions of times. that's my only guess.
    hmm. I would store the lines in a

             std::vector<std::string> vsLines;
    

    fast, and line number addressable using square brackets (you just add 1 when displaying), and total line count is .size()
    I have no access to your source code, and I have not written aN editor, so I can't disctate anything, but I can give ideas. standatd c++ library can be very useful. and C++14 is coming soon to a compiler near you.

     
  • Jim Michaels
    Jim Michaels
    2013-07-09

    it seems npp's line number limit is about 150k lines before it hangs or windows kills it. this isn't a rigorously tested number. but it will definitely not take 300,000 lines. please fix.

    this means I can't edit 100k to million-row sql databases like Maxmind.com's GEOIP. you can download this as a zip file by the way.

    this is rather a severe limitation on an editor. I have NOT EVEN REACHED the 2GB filesize limit of 32-bit programs, though the overhead of an HTML file may be larger. I am still talking about 7-10MB files here. this should NOT be a problem.

    according to task manager, it's using a peak of 147MB of memory. I have noticed that for instance when firefox gets to about 500-600MB of memory, it kills itself or crashes from lack of memory, and it's also 32-bit. I noticed a while back that this is nowhere near 4GiB. it is actually 1/8 of that. I know the video card takes up 2GiB. so that leaves 2GiB left, minus whatever the OS takes for operating overhead. I don't entirely understand this, which I guess doesn't leave much, from what I have seen the OS usually takes up about 1.5GiB on 32-bit XP (but right now "System" consumes on windows 6GB of Commit according to the Performance tab, but this seems useless to 32-bit, it seems to only apply to 64-bit stuff).

     
    Last edit: Jim Michaels 2013-07-13