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

List:       kwrite-devel
Subject:    Re: About dyn. word warp
From:       Christoph Cullmann <cullmann () babylon2k ! de>
Date:       2002-03-30 11:40:34
[Download RAW message or body]

On Saturday 30 March 2002 11:10, Christoph Cullmann wrote:
> On Friday 29 March 2002 21:22, Joseph Wenninger wrote:
> > Hi
> >
> > > > > and therefor have allready the stuff in it we need ? or does the
> > > > > lineMapping goes wider than the current visible stuff ? if not, we
> > > > > should drop it and merge it with the lineRanges, as they are even
> > > > > faster then the hash as a plain and little array.
> > > >
> > > > With proper range checks for the Ranges that should work, although
> > > > I'm not sure if it is really efficient when invalidating the
> > > > virtualline-realline mapping and the Ranges are allocated always for
> > > > the complete document, which causes some an unnecessary high memory
> > > > consumption, but it's worth a try
> > >
> > > Mom, for the whole document ? I thought the ranges would only be needed
> > > for the at the moment visible line count (I mean endLine-startLine =
> > > linecount of the current view), why does we need it for the whole
> > > document ? can 't we recreate it on scrolling/editing from the stuff in
> > > the regionTree ? as it is done now ?
> >
> > oops, sorry. That had been my mistake, yes in the current version it does
> > technically the same, so we should be able to merge them without problems
>
> Have commited my "first try" merge. It seems to work but perhaps need some
> more range-checks in some places, but QMemArray will help us to disallow
> wrong mem use.

I have changed the folding repaint slot in the view to:


void KateView::slotRegionVisibilityChangedAt(unsigned int)
{
	kdDebug()<<"void KateView::slotRegionVisibilityChangedAt(unsigned 
int)"<<endl;
	myViewInternal->updateView(KateView::ufFoldingChanged);
}

and updateView(ufFoldingChanged) triggers a repaint () of the internal view.

We should try to change clearDirtyCache() to this behaviour:
- resize the lineRanges to the current in the viewarea visible line count
- fill it with the right values for line (real line), start and end col, 
wrapped (the last three at the moment only to 0,0,false)

What would we win:
- repaintEvent needn't to check for the getRealLine, as the lineRanges always 
hold the right value
- we could try to implement updateView clever to only trigger the 
clearDirtyCache if needed, we could try to avoid unneeded checks with 
getRealLine calls

>
> > Kind regards
> > Joseph Wenninger
> >
> > _______________________________________________
> > kwrite-devel mailing list
> > kwrite-devel@mail.kde.org
> > http://mail.kde.org/mailman/listinfo/kwrite-devel

-- 
Christoph Cullmann
Kate/KDE developer
cullmann@kde.org
http://kate.kde.org
_______________________________________________
kwrite-devel mailing list
kwrite-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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