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

List:       kwrite-devel
Subject:    Re: QSharedPointer <-> QWeakPointer
From:       Dominik Haumann <dhdev () gmx ! de>
Date:       2011-09-13 5:59:36
Message-ID: 201109130759.36536.dhdev () gmx ! de
[Download RAW message or body]

On Tuesday, 13. September 2011, Milian Wolff wrote:
> > Are there any profiles which this shows up at all? In the end,
> > ctor/dtor is just atomic increment/decrement in most cases.
> 
> I mostly saw it in the totalCharacters because it is called really often
> in Kate and hence is calling m_buffer->plainLine even more.

KateDocument::totalCharacters should be reimplemented, to just call 
m_buffer->totalCharacters. This then calls for each block totalCharacters(), 
and each block just iterates over the vector to call totalcharacters on each 
line. Then you have 0 SharedPointers added. It's still O(n) of course.

Greetings,
Dominik
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://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