3
I've always wondered why is it so slow to open up a 50 MB text file, either in Notepad++ in Windows or Pluma in Linux.
I have a computer with 16 GB of RAM, can't the OS just put the whole file in RAM and display it in seconds? I would have guess that copying 50 MB into the RAM would only take a second.
I can open up that text file with nano in seconds or I can grep something in it in seconds too. But why is it so slow with a GUI text editor?
1Thanks for your comment, there's no syntax coloring but I've found why it is so slow and it's just because there's is some really long lines in it. An SQL INSERT statement. If there's no long lines, it's quite fast to open up a text file with Notepad++ or Pluma. I'm still wondering why it would be so slow with long lines though. – Zurd – 2016-07-24T03:22:43.520
1@Zurd line wrapping? Is it on or off by default? – Tair – 2016-07-24T05:58:24.607
@tair Line wrapping is off but if I enable it, it is faster to open! Thanks for the trick! – Zurd – 2016-08-09T20:13:12.440
@Zurd That is interesting, because I expected line-wrapping=off to be faster :) – Tair – 2016-08-10T08:02:04.910