don't click here

Notepad Lag

Discussion in 'Technical Discussion' started by MarkeyJester, Jan 26, 2012.

Thread Status:
Not open for further replies.
  1. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    OK, to debrief on what I mean here before asking, allow me to thoroughly explain the situation.

    The tool "Notepad.exe" that comes with Windows operating systems is what I use on a very frequent basis, and about 4 years ago I found that every time I performed a complete harddisk format and new installation (to clean and optimise, etc, yada, yada), Notepad would change in performance, on some installations I found that inserting or removing new lines, or replacing highlighted text in documents (those with huge amounts of text) would cause a slight delay (a.k.a. lag), while on some installations I found the lag to simply not exist at all with no trouble (and we're talking the same machine here, and same installation). I later found out that is was the additional language support that came with windows that was the cause of the lag, and that by not installing the additional languages (ones I didn't need) would allow Notepad to insert/remove/replace strings of text with no lag at all.

    To jump ahead now 4 years on, I recently got a new computer because my old one was taking its toll on me, unfortunately it came with Windows 7, and I wasn't able to downgrade to XP like I wanted, but no matter, I can deal with that as I am not too fussy with these things (I can learn to live with a few bent rules), however, I found that Notepad had the same issue of lag that I explained above, now at first I assumed the lag was caused by the same issue as XP's, but with it being slightly hard to navigate around 7, I haven't been able to fully look into languages, it seems that a certain language install/remove section that was shown on a page explaining "how to install/remove languages" doesn't exist on my side, hence I'm assuming there is only one language support in use at the moment, and that is the one I'm using now.

    This is where I look to you lot retro for your wisdom, if language support is not the cause of this lag (in this instances), then do you happen to know what the cause is? And if so, do you happen to know how to remove/resolve it?

    I'm really not happy with having to wait a few seconds for a new line to insert, and I cannot accept the fact that inserting/removing/replacing text on large documents in Notepad on Windows XP would have no lag at all, while 7 can being the newer software and being on a much faster machine, that just seems like bullshit to me...

    I would also like to point out that I have no intent on looking for another text editing tool (because I shouldn't have to really), so please don't recommend any.
     
  2. FuzzballFox

    FuzzballFox

    Hmmmmm Member
    575
    0
    0
    UK - Hampshire
    Nothing anymore
    Thought about downgrading back to the old Notepad.exe?
    I pretty much HAD to redownload the old Paint.exe for obvious reasons, but I am unsure if your lag issue would be improved by trying the original on your new machine
     
  3. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    I didn't no, mainly because I assumed that because the cause of XP's lag was not specifically notepad itself, it might be likely that 7's is of the same nature, and that using XP's would make no difference.

    But just for the sake of making sure, I just gave XP's a try, and yeah, the lag is still present, so as I understand it, it is something external and not specific to notepad that is causing this lag (correct me if I'm wrong anyone). Thanks for replying though, I do appreciate the suggestion.
     
  4. ValleyBell

    ValleyBell

    Tech Member
    246
    25
    28
    researching PC-98/X68000 sound drivers
    I'm using notepad.exe a lot to trim vgms, so I work with quite large files. And I always had the feeling that it works a lot slower in Win7 than in WinXP. (It seems to work faster even on my old Pentium II with Win2000!)

    I'm using a laptop with Intel i5 2.4 GHz and 4 GB RAM and when I read your post, I had to test it by myself.
    So I used vgm2txt to make an 8 MB txt-file, opened it with notepad.exe, copied the first 2 lines and pasted them a few times at the start of the file. Pasting the two lines one time took as long as opening the file in all cases.

    I have both, Win7 and WinXP, installed on my laptop and here are the results:
    Windows XP:
    - automatic line breaks disabled: 1 second
    - automatic line breaks enabled: 2-3 seconds

    Windows 7:
    - automatic line breaks disabled: 9 seconds
    - automatic line breaks enabled: 16 seconds

    I used the Win7 notepad.exe on Windows 7, but a quick test showed that the XP notepad has the same lag and loading times as the Win7 one.
     
  5. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    How big are the files you are trying to open? Or does this happen with any file?
     
  6. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    Approximately 1MB, but opening them isn't a problem as much, just replacing text and/or inserting/removing new lines. I won't buy the idea that the file being too large is the main reason for the lag, especially when I've been able to open the very same file with the very same tool before with no lag =$
     
  7. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    2
    18
    Estonia, Rapla City
    T-04YBSC-A !
    it is one of the reasons my primary text editor is now EDIT.COM, or Metapad.exe
     
  8. With or without word wrap? I seem to remember that making a huge difference in Notepad... When you have word wrap on, the program has to constantly calculate where the lines break, which can be pretty slow if the file is 1MB+. I use Notepad++ now, which is better in every way, but can be as simple as the regular Notepad if you don't want to use any of the extra features.
     
  9. Conan Kudo

    Conan Kudo

    「真実はいつも一つ!」工藤新一 Member
    478
    1
    18
    If you want to examine how notepad is made, you can get the source code for Notepad and WordPad from the Windows Platform SDK on Microsoft's website. Believe me when I say that Notepad is so simple, it's self-destructive at times.
     
  10. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,201
    431
    63
    Japan
    I do recall seeing something along the lines of word wrap causing lag when searching on google, but I never have word wrap on...
     
  11. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Notepad likes to lag on MB-sized files... At least that's my experience with it.
     
  12. Overlord

    Overlord

    Now playable in Smash Bros Ultimate Moderator
    19,234
    969
    93
    Long-term happiness
    This is part of why I use notepad2 for anything that's above about 500KB in size.
     
  13. Covarr

    Covarr

    Sentient Cash Register Member
    4,233
    3
    18
    Trapped in my own thoughts.
    Two stageplays, a screenplay, and an album
    I'm a big fan of Notepad++ myself. Support for AutoIt and NSIS (among MANY other languages), as well as the ability to output straight to a compiler, go a long way.
     
  14. Black Squirrel

    Black Squirrel

    no reverse gear Wiki Sysop
    8,585
    2,481
    93
    Northumberland, UK
    steamboat wiki
    I think the idea with Notepad (as with many default Windows programs) is that it's not supposed to handle megabytes worth of data. The expectation is to use a more capable program if you find yourself using these features a lot (and I'll second the use of Notepad++ while I'm here)

    Notepad is just capable enough for Windows developers to do quick tests of software, but doesn't bog down systems with tons of features they might not need. It used to be the same with Paint and Sound Recorder and whatever. Chances are some of the code behind it still dates from 1985 (or at least the Windows 95 build) so it likely never expected to receive 8MB worth of data (and thus wasn't tested to see if it would cope).
     
  15. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    Basically this. Notepad is simply a wrapper around the default Win32 EDIT control, which isn't designed to handle large amounts of text. (In Win9x and earlier, it couldn't even handle more than 64 KB!)

    The EDIT control is mostly intended for textboxes, not displaying huge amounts of text. Hence, it's not optimized for displaying large files.
     
  16. Glitch

    Glitch

    Tech Member
    175
    12
    18
    ^^ This. Notepad++ (and my editor of choice, Programmer's Notepad) are built around the scintilla component which is specifically designed for this use case.
     
  17. Destructiox

    Destructiox

    Masochistic Maniac, Raving Lunatic Member
    237
    0
    0
    East Midlands, England
    Sonic 1 Lunacy.
    My editing tool of choice is UltraEdit, I had some of the same lag problems you are experiencing with Notepad, Markey (with saving/loading the file also taking up a ridiculous amount of time.)
     
  18. Meat Miracle

    Meat Miracle

    Researcher
    1,664
    5
    18
    Notepad actually had a limit of 32k or 64k files back before Windows 2k or XP removed it, it just threw an error dialog if you tried opening bigger things. If memory recalls right, you could still open a file that was smaller, edit it long enough so it grows past the border, and save. You just couldn't reopen it again.

    Thirding Notepad++.
     
  19. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    The limit was 65535 characters, pretty much - which is curious because edit.com could actually open larger files (65280 lines of up to 1021 characters each, if I recall correctly, making up for a maximum of around 63.5 MB, although of course the real limit depended on how many characters did you have per line =P).
     
  20. TmEE

    TmEE

    Master of OPL3-SA2/3 Tech Member
    1,726
    2
    18
    Estonia, Rapla City
    T-04YBSC-A !
    Win9x notepad kindly asks if you want to use Wordpad instead for opening files larger than 64KB
     
Thread Status:
Not open for further replies.