Fwd: kdevelop kwrite faster Syntaxhighlighting done.

John Birch jbb at kdevelop.org
Wed Dec 20 21:07:54 UTC 2000


Hi,

I've applied your patch to kdevelop1.4. It does indeed speedup switching 
between files :-) I don't get the 7 times faster but then this is on the kde2 
sources, so things are different. If you have kde2 try out the new version on 
cvs tag KDEVELOP_1_4. Patches will be most welcome. :-)

> highlightstore is need because i dont know how i can access highlight from

I removed highlightstore as each main class in kwrite is a friend of every 
other main class!!!! So a kWriteDoc->highlight->dohighlight(...) was all that 
was needed.

About the bookmarks. The kdevelop1.x sources are not going to be used after 
1.4, so I would suggest to get the kdevelop2.0 sources and add to that. At 
the moment kdevelop2.0 is in development so it's not fully functional. I 
suspect bookmarks will be different, and may have been implemented better 
already as well. I don't know...

In terms of the editor - we are going to use the KParts editor in kde2.0 so 
speed ups in kdebase's kwrite will not only benefit kdevelop but kde2 and any 
other app that uses the editor part. At the moment we have a local copy of 
the editor so that we can play with it without disturbing kdebase. Changes in 
our kwrite should migrate to kdebase in the future. Currently our kwrite is 
old in comparison to the kdebase kwrite and needs to be brought uptodate. 
Using the KParts editor will allow the user to switch between KParts editors 
(eg KWrite and KVim (which is becoming a KPart))

So, hope to see more from you soon, and many thanks for your patch. :-)

jbb

On Tue, 05 Dec 2000 02:40, Sandy Meier wrote:
> Hi!
>
> I got following email. Maybe someone with more experience in KWrite can
> review this patch?
>
>
> Ciao!
> Sandy
>
> ----------  Forwarded Message  ----------
> Subject: kdevelop kwrite faster Syntaxhighlighting done.
> Date: Sat, 2 Dec 2000 12:50:40 +0100
> From: <berndroesch at gmx.de>
> To: <smeier at rz.uni-potsdam.de>
>
>
>
> Hallo
> here is 7 * faster Syntaxhighlighting with little Changes.
> I hope i have the right e-mail for changes in kdevelop/kwrite.If not and if
>  you know the right address please mail me the correct address.Many Thanks.
> With this changes doHighlight is only called for the visible lines.In uae
>  compemu.c with 51000 Lines loading or displaying in debugger take without
>  Patch 12 sec with Patch 1.8 sec.Switching between kview and kdoc take
>  without Patch 3 sec with not mesurable;
>
> The changes are easy so no patch file is requered.
>
> in file: kdevelop/kwrite/kwdoc.cpp
> Insert Global Definition: Highlight *highlightstore;
> in Class: KWriteDoc::updateLines(int startLine, int endLine, int flags) {
> replace line: ctxNum = highlight->doHighlight(ctxNum,textLine);
> with: if(endLine-line<4)ctxNum = highlight->doHighlight(ctxNum,textLine);
> in file: kdevelop/kwrite/kwview.cpp
> in Class: void KWriteView::paintEvent(QPaintEvent *e) {
> after: while (y < yEnd)
> insert this:
>  ****start
> TextLine *textLine;
> extern Highlight *highlightstore;
> int ctxNum = 0;
> if ((kWriteDoc->getTextLineCount()-1)>line){
>     textLine = kWriteDoc->textLine(line);
>     if (line > 0) ctxNum = kWriteDoc->textLine(line - 1)->getContext();
>     ctxNum = highlightstore->doHighlight(ctxNum,textLine);
>     textLine->setContext(ctxNum);
> }
> **** stop
> highlightstore is need because i dont know how i can access highlight from
>  kview Class. I think the programmer of kwrite change this faster than I so
> I search no longer because it work so.Please send back problems suggestions
> to berndroesch at gmx.de.I have also a idea for global Bookmarks(Bookmark
> marked in text with   //!!Bookmark).So easy add a second grep window with
> search for / /!!%s.I have only added / /!!%s to the template Listbox but it
> is better to use a second window.
> I dont know any about qt so let me know if someone is interresting  to do
>  that in the best Unix IDE.

-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop-devel mailing list