Light-Weight Text Editor for Gnome

gedit handles opening big files badly

Reported by Sebastian Breier on 2007-10-23
176
This bug affects 30 people
Affects Status Importance Assigned to Milestone
gedit
Confirmed
Medium
gedit (Ubuntu)
Medium
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gedit

Opening big text files (400 MB, 750 MB) in gedit is bad
- from a usability standpoint
  -> There's no progress bar or cancel button for the action, and the load takes a long time.
- from a system standpoint:
  -> In earlier versions, gedit would take so much memory until the system swapped all other applications to disk, and the system became unusable.
  -> Since Ubuntu 9.04 Beta, gedit crashes without a GUI message, but the message "failed to allocate <X> bytes" in the console.

Original description:
I just opened a 400 MB text file (mbox mail file) in gedit, and it my system has now been unresponsive for minutes. Other editors can open large files without a problem. Also, there's no progress bar or cancel button that would make it easy to see how long gedit is loading the file or to cancel the load.

Pedro Villavicencio (pedro) wrote :

Thanks for your report.

Changed in gedit:
assignee: nobody → desktop-bugs
importance: Undecided → Medium
status: New → Triaged
Changed in gedit:
status: Unknown → New
Changed in gedit:
status: New → Invalid
Changed in gedit:
status: Unknown → Confirmed
Volodya (volodya) wrote :

Memory useage is also more than it should be. I have opened a 5 MiB file and memory used is 24.7 MiB and rising.

Sebastian Breier (tomcat42) wrote :

I just tried the same in 9.04 Beta, and gedit crashed without a warning.
Starting gedit from the console, I get an allocation error.

description: updated
badawi (danielbadawi) wrote :

same problem here
freeze with a text file with only 2MB.

The content of the file is a single line... with 2MB

Marat Dyatko (marat-dyatko) wrote :

Same problem
Sometimes me can help switching off a syntax highlighting

Denis Koryavov (dkoryavov) wrote :

I have the same problem, and I have found one interesting detail: Gedit works fine if the file contains relatively short lines. In this mode, Gedit can open very large files (more than 100 MB). If the lines are long, Gedit freezes (and sometimes crashes) on a 4 MB file. Option "word wrap" no significant impact on productivity.

Ubuntu 9.10.

Alex Solanos (hakermania) wrote :

I have the same problem. Even if I open a file sized 15 MB and scroll down quickly, Gedit crashed without any message.

tjombka (m-michalczyk) wrote :

The same problem with 4MB files.

Changed in gedit:
importance: Unknown → Medium
Narcis Garcia (narcisgarcia) wrote :

I've open a 54MiB .sql file with gedit 2.30.4 (Ubuntu 11.04) and no problem. There is now a progress bar.

But there are some lines with near 300000 columns where the editor doesn't scroll text when the user walks with the keyboard cursor to the first or the last characters, and with "text wrapping" it refreshes poorly the work area when Search&Replace.

I have noticed this bug. I have a 5MB document with very long lines. Each line is approximately a million characters wide.

If you view it with word wrap OFF then the computer becomes very unresponsive. Scrolling the scrollbars particularly hangs the computer for a long time.

I'm on gedit 2.30.4. I'm using a 15GB machine so manipulating a 5MB text file should not be causing it to sweat.

I've attached an example file that causes the problem. Make sure you view it with text wrap off.

David Mignani (david-mignani) wrote :

I experimented a similar problem.
I use gedit to inspect huge SQL dump files (40-50 MB).
With Ubuntu 10.04 (gedit v. 2.30.3, if I rebember well) I got such files opened in few seconds, while with Ubuntu 12.04 (and gedit v. 3.4.1) the operation is terribly slow and impacts the whole system speed and responsiveness.

NoBugs! (luke32j) wrote :

Same here,with 13.10, on a relatively small 23MB file - very high cpu, though it is using <100MB of memory! With 6gb RAM you would think it would be able to open it. Ironically, the full IDE MonoDevelop opens the file in a second.

tr33m4n (tr33m4n) wrote :

Same on 13.10 64. I've not experienced such performance loss when opening large files in say Kate, Geany etc

svecpetr (svecpetr-svecpetr) wrote :

Same on 13.10 and big files begin on 1 MB of XML data ... (quad core and 16 GB of free memory is not enought to open 1 MB file)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.