Light-Weight Text Editor for Gnome

gedit slow on long lines

Reported by Stephan7 on 2007-08-23
38
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gedit
Fix Released
High
gtksourceview2 (Ubuntu)
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gedit

I was opening a 16KB file containing about 15000 characters of generated html-text on one line,
to my surprise the editor did not respond until a minute later.

In comparison: the command line editor "vi" opens the same file under 1 second.

It seems the coder of gedit did not expect files with very long lines.

Anyway.. I consider this a minor bug as I use gedit mostly for few and short lines,
however when people expect it to view any kind of text (generated or not) it should handle it faster.

Stephan7 (sshsteph007) wrote :

Probably any kind of long lines reproduce this problem, but here the real example used
(the source code of google.com preferences in Dutch)

The ubuntu about version is Gutsy 7.10
Gnome about version: 2.19.6

From synaptic:
gedit 2.19.90-0ubuntu1

Pedro Villavicencio (pedro) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. I've tested gedit here too with a file with around 37000 lines and it open it in like 1 second, and yeah vi takes a lot less than that but never a minute to load it. not confirming.

Changed in gedit:
assignee: nobody → desktop-bugs
importance: Undecided → Low
Sebastien Bacher (seb128) wrote :

Thanks for the bug report. This particular bug has already been reported, but feel free to report any other bugs you find.

Changed in gedit:
status: New → Invalid
Sebastien Bacher (seb128) wrote :

Somewhat similar to bug #26439, upstream also has http://bugzilla.gnome.org/show_bug.cgi?id=114337 though, reopening

Changed in gedit:
status: Invalid → Triaged
Changed in gedit:
status: Unknown → Confirmed
Stephan7 (sshsteph007) wrote :

Above problem is the combination of html codes and long lines,

As reducing the content of above file preferences.txt to smaller lines is read fast by gedit.
Also converting the content of above file preferences.txt to non-html code (by replacing each '<' and '>'
with an 'x' in vi) is read fast by gedit.

So I guess it has to do with the html parsing of very long lines which takes so long.

Edit lines even of about 500 chars is sensibly slow, but this happen to me only if highlighting is on (with LaTeX source). If I set highlighting for other languages on the same LaTeX document the slowness increase or decrease a lot.

Jason Miller (millermobile) wrote :

Is this going to get patched, or am I waiting until next version before I can regain use of gedit on 7.10 Gusty?

The gnome blog mentioned a patch, but I can't seem to find it anywhere.

Bruno (brunovecchi) wrote :

I confirm this bug with non-html text. I am writing a report in LaTeX, and editing not-so-long lines with math-environments is quite slow. RAM usage is 15% (out of 2GB) and processor goes to 100% when editing the following line:

Chequeo clones de $\gamma$1 (y $\gamma$2 utilizando el primer interno 3IgGCH1 con colony-PCR. Sólo hago el chequeo con clones que hayan dado positivo por colony-PCR utilizando los primers de clonado (pág. \pageref{08-04-01}). Los clones chequeados son: $\gamma$1\#1, $\gamma$1\#3, \gamma$1\#4, $\gamma$1\#5, $\gamma$1\#6, $\gamma$1\#7, $\gamma$1\#8, $\gamma$1\#9, $\gamma$1\#10, $\gamma$1\#11, $\gamma$1\#12, $\gamma$2\#1, $\gamma$2\#2, $\gamma$2\#3, $\gamma$2\#4, $\gamma$2\#6, $\gamma$2\#8, $\gamma$2\#9, $\gamma$2\#10 y $\gamma$2\#12. Utilizo pRTLF202 como control positivo.

I've got the LaTeX plugin activated, and syntax highlighting is also on. If I turn syntax highlighting off, the slowdown disappears, so I guess it might have to do with that.

Bruno (brunovecchi) wrote :

Sorry, I just realized that my problem is perfectly described in bug #145400. Ignore this and my previous comment!

Changed in gedit:
status: Confirmed → Fix Released
Pedro Villavicencio (pedro) wrote :

fixed upstream already, thanks for reporting.

Changed in gedit:
status: Triaged → Fix Committed
Sebastien Bacher (seb128) wrote :

the new version is in intrepid now

Changed in gtksourceview2:
status: Fix Committed → Fix Released
Changed in gedit:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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