response to typing is very slow with code highlight with some files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gedit |
New
|
Undecided
|
Unassigned | ||
gedit (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
When editing files with code highlight mode set to "php" (maybe the same happens with other modes too), gedit sometimes is ridiculously slow to respond to typing. That is, when you type, the text you type appears with a very noticeably (and annoying) delay.
This seems to happen with some particular files more than others, so I attach one particular file with which I experience the issue. I guess the issue is triggered by some syntax pattern. I have some much bigger files that don't cause any trouble when editing them, so it is not just a matter of file size.
It is reasonable to expect that code highlighting increases cpu consumption, but definitely not that much.
I've used a few other editors with code highlight and NEVER seen one become so slow even with files a lot bigger than this
And even if computing the highlight had a critical cost, then more priority should be given to typing response than to computing the highlights, e.g. by only recomputing highlighting when the keyboard is idle for a given fraction of a second or (if this doesn't happen) every n-th character and not for every single character, etc
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gedit 2.30.3-1ubuntu1
ProcVersionSign
Uname: Linux 2.6.35-30-generic i686
NonfreeKernelMo
Architecture: i386
Date: Sat Jul 30 22:35:40 2011
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: gedit
Changed in gedit (Ubuntu): | |
importance: | Undecided → Low |
I'm experiencing the same with LaTeX files having long lines!
If I change the highlighting, for instance, to .ini or a lot of other languages, the long delays go away when inserting text at the beginning of the line.
I created an example for testing (cf. attachment). Try to insert some characters at the beginning of the line.
Thanks a lot in advance!