[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: gedit slow with a 1.5Mb text file



Wayne Hartell wrote:
> I grabbed a 1.5MB text file from Windows (converted using dos2unix, not
that it appears 
> to make a difference) and tried to open this in gedit and it takes about
45 seconds to open 
> the file. That is a whole lot slower than I was expecting. To make things
worse the 
> performance within gedit is very sluggish and searching the text file is
not possible; 
> it simply locks up the gedit process (maxes out the CPU).

> I did some research and attempted to use gvim (no performance issue per
se, but it just 
> gives me weird output when trying to navigate the file). I got similar
weird output with vi. 
> Search functionality seems to work at least.

> Navigating the file seems to work as expected in gedit, but the
performance stinks. So it's 
> performance and weird output (vi/gvim), or completely slow to the point
it's unusable, and 
> expected output (gedit). Neither option works for me. I didn't think that
I would ever have 
> fond thoughts of Notepad, but right now... well I digress.

> I have noted discussions on-line where people are complaining that gedit
can't handle text 
> files of the order of 100's of MB, but the file I am dealing with here is
1.5MB. I tested this 
> on two Debian systems (one virtual, one real) and got the same result.

> I know dealing with text files under Linux is a topic of great discussion
(whereas under 
> Windows you never need to think about it), but surely it cannot be this
painful to deal 
> with a plain text file?

> One thing I have noticed under vim is that if I turn on line numbers the
document is showing 
> as several large chunks of text on a handful of lines, as opposed to a
large number of short lines.  
> Would this be tripping up gedit performance wise perhaps? (And vi/gvim,
presentation wise?) 
> Any advice or tips on this, especially from Windows to Linux converts,
would be gratefully 
> received.

> Right now it looks like I have to use two text editors to get what I want
(gedit, as painfully 
> slow as it is, to read through the file) and vi/gvim to search it.

I found the following link and used the "fold" command to wrap the long
lines in the text file to 80 
columns and viola, gedit now runs fast and the searches work.

http://www.cyberciti.biz/tips/linux-unix-word-wrap-command.html

So I guess gedit really was choking on the very long lines in the source
file.

Thanks to everyone that responded.

Cheers,
Wayne.


Reply to: