D17441: tune editing actions for large number of small edits
Christoph Cullmann
noreply at phabricator.kde.org
Sat Dec 8 21:40:33 GMT 2018
cullmann added a comment.
Yes, even after this optimization :P 10%
Here is the flat profile, after all this (using the test case from the bug, replacing \t with ; and terminating kwrite afterwards)
86.90% 2.05% kwrite libQt5Core.so.5.11.2 [.] QMetaObject::activate
86.50% 0.00% kwrite libKF5TextEditor.so.5.53.0 [.] KateSearchBar::qt_static_metacall
86.48% 0.00% kwrite libKF5TextEditor.so.5.53.0 [.] KateSearchBar::replaceAll
86.48% 0.00% kwrite libQt5Widgets.so.5.11.2 [.] QAbstractButton::clicked
86.48% 0.00% kwrite [unknown] [.] 0x00007ff1fbcecb00
86.08% 0.13% kwrite libKF5TextEditor.so.5.53.0 [.] KateSearchBar::findAll
72.36% 0.17% kwrite libKF5TextEditor.so.5.53.0 [.] KateMatch::replace
58.83% 0.08% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::replaceText
30.05% 0.10% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::removeText
29.33% 0.18% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::editRemoveText
28.24% 0.09% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::insertText
27.38% 0.14% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::editInsertText
14.03% 0.15% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBuffer::removeText
13.01% 0.07% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBuffer::insertText
10.65% 0.03% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::textRemoved
10.56% 0.76% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextCursor::setPosition
10.24% 0.01% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::textInserted
10.10% 0.02% kwrite libKF5TextEditor.so.5.53.0 [.] QtPrivate::QSlotObject<void (KateVi::NormalViMode::*)(KTextEditor::Document*, KTextEditor::Range), QtPrivate::List<KTextEditor::Document*, KTextEditor::Range const&>, void>::impl
10.09% 0.03% kwrite libKF5TextEditor.so.5.53.0 [.] QtPrivate::FunctionPointer<void (KateVi::NormalViMode::*)(KTextEditor::Document*, KTextEditor::Range)>::call<QtPrivate::List<KTextEditor::Document*, KTextEditor::Range const&>, void>
10.05% 0.04% kwrite libKF5TextEditor.so.5.53.0 [.] QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<KTextEditor::Document*, KTextEditor::Range const&>, void, void (KateVi::NormalViMode::*)(KTextEditor::Document*, KTextEditor::Range)>::call
9.04% 1.36% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBlock::removeText
9.04% 0.11% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextCursor::setPosition
8.42% 1.23% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBlock::insertText
8.39% 0.02% kwrite libKF5TextEditor.so.5.53.0 [.] QtPrivate::QSlotObject<void (KTextEditor::DocumentPrivate::*)(KTextEditor::Document*, KTextEditor::Range const&), QtPrivate::List<KTextEditor::Document*, KTextEditor::Range const&>, void>::impl
8.38% 0.03% kwrite libKF5TextEditor.so.5.53.0 [.] QtPrivate::FunctionPointer<void (KTextEditor::DocumentPrivate::*)(KTextEditor::Document*, KTextEditor::Range const&)>::call<QtPrivate::List<KTextEditor::Document*, KTextEditor::Range const&>, void>
8.34% 0.06% kwrite libKF5TextEditor.so.5.53.0 [.] QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<KTextEditor::Document*, KTextEditor::Range const&>, void, void (KTextEditor::DocumentPrivate::*)(KTextEditor::Document*, KTextEditor::Range const&)>::call
8.13% 0.25% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::saveEditingPositions
7.63% 0.54% kwrite libKF5TextEditor.so.5.53.0 [.] KateVi::Marks::setMark
6.48% 0.40% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextRange::fixLookup
6.45% 0.03% kwrite libKF5TextEditor.so.5.53.0 [.] KateMatch::searchText
5.84% 0.19% kwrite libKF5TextEditor.so.5.53.0 [.] KateBuffer::plainLine
5.48% 0.04% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::newMovingRange
5.48% 0.06% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::searchText
5.47% 0.20% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBuffer::line
5.36% 0.14% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextRange::TextRange
4.99% 0.11% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextRange::checkValidity
4.92% 0.13% kwrite libKF5TextEditor.so.5.53.0 [.] KateVi::NormalViMode::textInserted
4.85% 0.12% kwrite libKF5TextEditor.so.5.53.0 [.] KateVi::NormalViMode::textRemoved
4.69% 1.65% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBuffer::blockForLine
4.04% 1.08% kwrite libKF5TextEditor.so.5.53.0 [.] QBasicAtomicInteger<int>::load
3.89% 0.04% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBuffer::textInserted
3.84% 1.52% kwrite libKF5TextEditor.so.5.53.0 [.] QtPrivate::RefCount::isShared
3.82% 0.05% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBuffer::textRemoved
3.71% 0.13% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBlock::insertCursor
3.66% 0.01% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextRange::~TextRange
3.59% 0.05% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextRange::~TextRange
3.56% 0.18% kwrite libKF5TextEditor.so.5.53.0 [.] QSet<Kate::TextCursor*>::insert
3.46% 0.09% kwrite libKF5TextEditor.so.5.53.0 [.] KateVi::Marks::setLastChange
3.44% 0.92% kwrite libKF5TextEditor.so.5.53.0 [.] QtPrivate::RefCount::deref
3.35% 2.62% kwrite libKF5TextEditor.so.5.53.0 [.] QAtomicOps<int>::load<int>
3.32% 0.09% kwrite libKF5TextEditor.so.5.53.0 [.] KateMatch::buildReplacement
3.15% 0.28% kwrite libKF5TextEditor.so.5.53.0 [.] QHash<Kate::TextCursor*, QHashDummyValue>::insert
3.15% 0.07% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBlock::removeCursor
3.06% 0.06% kwrite libKF5TextEditor.so.5.53.0 [.] QSet<Kate::TextCursor*>::remove
3.02% 0.19% kwrite libKF5TextEditor.so.5.53.0 [.] KatePlainTextSearch::search
2.99% 0.03% kwrite libKF5TextEditor.so.5.53.0 [.] KateLayoutCache::qt_static_metacall
2.93% 0.49% kwrite libKF5TextEditor.so.5.53.0 [.] QHash<Kate::TextCursor*, QHashDummyValue>::remove
2.87% 0.03% kwrite libKF5TextEditor.so.5.53.0 [.] KateVi::Marks::setFinishEditYanked
2.85% 0.29% kwrite libKF5TextEditor.so.5.53.0 [.] QSet<Kate::TextCursor*>::const_iterator::operator++
2.84% 0.10% kwrite libKF5TextEditor.so.5.53.0 [.] KateLineLayoutMap::slotEditDone
2.82% 0.53% kwrite libKF5TextEditor.so.5.53.0 [.] QHash<Kate::TextCursor*, QHashDummyValue>::findNode
2.68% 0.13% kwrite libKF5TextEditor.so.5.53.0 [.] KateUndoManager::addUndoItem
2.63% 0.08% kwrite libKF5TextEditor.so.5.53.0 [.] KateUndoManager::slotTextRemoved
2.56% 0.14% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBlock::updateRange
2.47% 0.33% kwrite libKF5TextEditor.so.5.53.0 [.] QBasicAtomicInteger<int>::deref
2.47% 0.48% kwrite libKF5TextEditor.so.5.53.0 [.] QString::~QString
2.39% 0.07% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBlock::removeRange
2.28% 2.19% kwrite libQt5Core.so.5.11.2 [.] QHashData::nextNode
2.26% 0.23% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::text
2.26% 0.20% kwrite libKF5TextEditor.so.5.53.0 [.] QVector<Kate::TextBlock*>::operator[]
2.21% 0.04% kwrite libKF5TextEditor.so.5.53.0 [.] KateUndoManager::slotTextInserted
2.19% 0.26% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBlock::line
2.18% 0.09% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentCursor::atEndOfDocument
2.07% 0.19% kwrite libKF5TextEditor.so.5.53.0 [.] QVector<Kate::TextBlock*>::data
2.05% 0.31% kwrite libKF5TextEditor.so.5.53.0 [.] QAtomicOps<int>::deref<int>
2.01% 0.07% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::documentEnd
1.98% 1.89% kwrite libKF5TextEditor.so.5.53.0 [.] QArrayData::data
1.97% 0.07% kwrite libKF5TextEditor.so.5.53.0 [.] QStack<QSharedPointer<KTextEditor::MovingCursor> >::pop
1.96% 1.80% kwrite libKF5TextEditor.so.5.53.0 [.] QHash<Kate::TextCursor*, QHashDummyValue>::findNode
1.94% 0.18% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextCursor::TextCursor
1.86% 0.11% kwrite libKF5TextEditor.so.5.53.0 [.] QSet<Kate::TextRange*>::insert
1.86% 1.78% kwrite kwrite [.] std::__atomic_base<int>::operator--
1.82% 0.03% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::lineLength
1.80% 0.23% kwrite libKF5TextEditor.so.5.53.0 [.] KateRegExpSearch::buildReplacement
1.71% 0.17% kwrite libKF5TextEditor.so.5.53.0 [.] QHash<Kate::TextRange*, QHashDummyValue>::insert
1.70% 0.13% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBuffer::blockForIndex
1.65% 0.10% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::line
1.62% 0.23% kwrite libKF5TextEditor.so.5.53.0 [.] QBasicAtomicInteger<int>::ref
1.58% 0.02% kwrite libKF5TextEditor.so.5.53.0 [.] KateLayoutCache::removeText
1.57% 0.05% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::DocumentPrivate::kateTextLine
1.54% 0.02% kwrite libKF5TextEditor.so.5.53.0 [.] KateVi::Marks::setStartEditYanked
1.52% 1.41% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextBlock::startLine
1.48% 1.46% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextCursor::lineInBlock
1.43% 0.28% kwrite libKF5TextEditor.so.5.53.0 [.] KateUndoGroup::addItem
1.43% 0.17% kwrite libKF5TextEditor.so.5.53.0 [.] QVector<Kate::TextBlock*>::detach
1.38% 0.20% kwrite libKF5TextEditor.so.5.53.0 [.] QAtomicOps<int>::ref<int>
1.37% 0.02% kwrite libKF5TextEditor.so.5.53.0 [.] KateLayoutCache::insertText
1.32% 0.30% kwrite libKF5TextEditor.so.5.53.0 [.] QTypedArrayData<Kate::TextBlock*>::begin
1.32% 0.10% kwrite libKF5TextEditor.so.5.53.0 [.] KateRegExpSearch::escapePlaintext
1.31% 0.28% kwrite libKF5TextEditor.so.5.53.0 [.] QHash<Kate::TextRange*, QHashDummyValue>::findNode
1.31% 0.05% kwrite libKF5TextEditor.so.5.53.0 [.] KateCompletionWidget::qt_static_metacall
1.30% 1.21% kwrite libc-2.28.so [.] malloc
1.29% 1.14% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::Cursor::line
1.26% 1.21% kwrite kwrite [.] std::__atomic_base<int>::operator++
1.24% 0.29% kwrite libKF5TextEditor.so.5.53.0 [.] QVector<Kate::TextBlock*>::isDetached
1.23% 0.51% kwrite libKF5TextEditor.so.5.53.0 [.] QVector<Kate::TextBlock*>::operator[]
1.23% 0.12% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::SwapFile::qt_static_metacall
1.22% 0.34% kwrite libKF5TextEditor.so.5.53.0 [.] QSharedPointer<Kate::TextLineData>::QSharedPointer
1.21% 0.00% kwrite [unknown] [.] 0x00005648626a95b0
1.19% 0.04% kwrite libKF5TextEditor.so.5.53.0 [.] QSet<Kate::TextRange*>::remove
1.14% 0.11% kwrite libKF5TextEditor.so.5.53.0 [.] QSharedPointer<Kate::TextLineData>::~QSharedPointer
1.13% 0.15% kwrite libKF5TextEditor.so.5.53.0 [.] QHash<Kate::TextRange*, QHashDummyValue>::remove
1.11% 0.03% kwrite libKF5TextEditor.so.5.53.0 [.] QVector<QSharedPointer<KTextEditor::MovingCursor> >::resize
1.09% 0.29% kwrite libKF5TextEditor.so.5.53.0 [.] QVector<QSharedPointer<KTextEditor::MovingCursor> >::reallocData
1.08% 0.07% kwrite libKF5TextEditor.so.5.53.0 [.] KTextEditor::MovingRange::setRange
1.08% 0.23% kwrite libKF5TextEditor.so.5.53.0 [.] QHash<Kate::TextRange*, int>::findNode
1.07% 0.23% kwrite libKF5TextEditor.so.5.53.0 [.] QtPrivate::RefCount::ref
1.05% 0.15% kwrite libKF5TextEditor.so.5.53.0 [.] QSharedPointer<Kate::TextLineData>::deref
1.04% 0.59% kwrite libKF5TextEditor.so.5.53.0 [.] Kate::TextCursor::line
1.03% 0.32% kwrite libKF5TextEditor.so.5.53.0 [.] QTypedArrayData<Kate::TextBlock*>::data
1.03% 0.06% kwrite libKF5TextEditor.so.5.53.0 [.] QStringList::~QStringList
1.00% 0.91% kwrite libKF5TextEditor.so.5.53.0 [.] QHash<Kate::TextRange*, QHashDummyValue>::findNode
REPOSITORY
R39 KTextEditor
REVISION DETAIL
https://phabricator.kde.org/D17441
To: cullmann, dhaumann, #kate, loh.tar
Cc: kwrite-devel, kde-frameworks-devel, hase, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20181208/a9ef97c2/attachment-0001.html>
More information about the KWrite-Devel
mailing list