[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    kedit and kdelibs SHOWSTOPPER with fix
From:       John Califf <jcaliff () compuzone ! net>
Date:       2000-10-07 14:49:51
[Download RAW message or body]

I have just been testing the latest snapshot (Oct. 4) of kedit and
wondered why it still takes so incredibly long to load even moderately
large files and why it outputs ugly debugging messages, printing the hex
value of every character in the file to stdout on a separate line, like:

U + 2A
U + 30
etc.

This makes kedit so slow in loading files as to be almost unusable. I
consider it a showstopper. It makes Windows Notepad look good  by
comparison, and is embarrassing for Kde.

Well, I tracked it down to the method KEdit::insertText(QTextStream
*stream) in kdelibs/kdeui/keditcl1.cpp.  There is an ugly printf
debugging message at the end of the method that prints out the unicode
value in hex for *every* character in the stream, on a separate line,
which slows kedit down by a factor of 10 it seems, and looks ugly as
sin. Just remove or comment out this message for the 2.0 release - it's
only for debugging, and kedit will perform just as fast as a bare Qt
text edit widget that it's based on, which is very fast, with this fix.  

The message to be removed from keditcl1.cpp is:

QString str = text();
for(i = 0; i < str.length(); i++)
   printf("KEdit: U+%04X\n", str[i].unicode());

Believe me, without this fix kedit is so slow as to be unusable for
anything other than a tiny file for anyone who wants to use Kde to get
work done or just to edit long email, etc.

Thanks, John
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic