Project

General

Profile

Bug #1227

Switching channels on OSX, Macbook retina, Quassel 0.9 takes > 7 seconds

Added by miohtama over 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Quassel Client
Target version:
-
Start date:
05/23/2013
Due date:
% Done:

100%

Estimated time:
Version:
0.9-pre
OS:
Any

Description

The following scenario

- Core upgraded to 0.9

- Client upgraded to 0.9

- OSX Mountain Lion

- Having channel and private message buffers from freenode.net network

- When starting the client

- when choosing any buffer for the first time

- There is unresponsiveness of 5-10 seconds before channel is opened, the application goes to unresponsiveness mode

Below is the stacktrace from the slowdown grabbed from Xcode Instruments.

Note: There is noticeable backlog of events, but the issue did not appear on 0.8 and it also happens for buffers having only recent history (< 3 days, only couple of messages)

{{{
Running Time Self Symbol Name
7411.0ms 99.9% 0.0 Main Thread 0x83519
7411.0ms 99.9% 0.0 start
7411.0ms 99.9% 0.0 main
7411.0ms 99.9% 0.0 QCoreApplication::exec()
7411.0ms 99.9% 0.0 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
7411.0ms 99.9% 0.0 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
7411.0ms 99.9% 0.0 QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
7411.0ms 99.9% 0.0 -[NSApplication run]
7401.0ms 99.8% 0.0 -[QNSApplication sendEvent:]
7401.0ms 99.8% 0.0 -[NSApplication sendEvent:]
7401.0ms 99.8% 0.0 -[QCocoaWindow sendEvent:]
7401.0ms 99.8% 0.0 -[NSWindow sendEvent:]
7399.0ms 99.8% 0.0 qt_mac_handleMouseEvent(NSEvent*, QEvent::Type, Qt::MouseButton, QWidget*, bool)
7399.0ms 99.8% 0.0 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool)
7399.0ms 99.8% 0.0 QCoreApplication::notifyInternal(QObject*, QEvent*)
7399.0ms 99.8% 0.0 QApplication::notify(QObject*, QEvent*)
7399.0ms 99.8% 0.0 QApplicationPrivate::notify_helper(QObject*, QEvent*)
7399.0ms 99.8% 0.0 QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*)
7399.0ms 99.8% 0.0 QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*)
7399.0ms 99.8% 0.0 QTreeView::viewportEvent(QEvent*)
7399.0ms 99.8% 0.0 QAbstractItemView::viewportEvent(QEvent*)
7399.0ms 99.8% 0.0 QAbstractScrollArea::viewportEvent(QEvent*)
7399.0ms 99.8% 0.0 QFrame::event(QEvent*)
7399.0ms 99.8% 0.0 QWidget::event(QEvent*)
7399.0ms 99.8% 0.0 QAbstractItemView::mousePressEvent(QMouseEvent*)
7399.0ms 99.8% 0.0 QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>)
7399.0ms 99.8% 0.0 QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&)
7399.0ms 99.8% 0.0 QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
7399.0ms 99.8% 0.0 SelectionModelSynchronizer::syncedCurrentChanged(QModelIndex const&, QModelIndex const&)
7399.0ms 99.8% 0.0 QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>)
7399.0ms 99.8% 0.0 QItemSelectionModel::currentChanged(QModelIndex const&, QModelIndex const&)
7399.0ms 99.8% 0.0 QMetaObject::activate(QObject*, QMetaObject const*, int, void**)
7399.0ms 99.8% 0.0 BufferWidget::currentChanged(QModelIndex const&, QModelIndex const&)
7399.0ms 99.8% 0.0 AbstractBufferContainer::currentChanged(QModelIndex const&, QModelIndex const&)
7399.0ms 99.8% 0.0 AbstractBufferContainer::setCurrentBuffer(BufferId)
7399.0ms 99.8% 0.0 BufferWidget::createChatView(BufferId)
7399.0ms 99.8% 0.0 ChatView::ChatView(BufferId, QWidget*)
7399.0ms 99.8% 0.0 ChatView::init(MessageFilter*)
7399.0ms 99.8% 0.0 ChatScene::ChatScene(QAbstractItemModel*, QString const&, double, ChatView*)
7398.0ms 99.7% 0.0 QSortFilterProxyModel::rowCount(QModelIndex const&) const
7398.0ms 99.7% 0.0 QSortFilterProxyModelPrivate::create_mapping(QModelIndex const&) const
7398.0ms 99.7% 2.0 MessageFilter::filterAcceptsRow(int, QModelIndex const&) const
7319.0ms 98.7% 4.0 IgnoreListManager::_match(QString const&, QString const&, Message::Type, QString const&, QString const&)
3170.0ms 42.7% 1.0 QRegExp::exactMatch(QString const&) const
3159.0ms 42.6% 1.0 prepareEngine_helper(QRegExpPrivate*)
531.0ms 7.1% 0.0 QRegExp::~QRegExp()
352.0ms 4.7% 0.0 QRegExp::setCaseSensitivity(Qt::CaseSensitivity)
89.0ms 1.2% 0.0 IgnoreListManager::scopeMatch(QString const&, QString const&) const
7.0ms 0.0% 1.0 QRegExpMatchState::prepareForMatch(QRegExpEngine*)
1.0ms 0.0% 0.0 QRegExp::QRegExp(QString const&, Qt::CaseSensitivity, QRegExp::PatternSyntax)
1.0ms 0.0% 1.0 QRegExp::~QRegExp()
1.0ms 0.0% 1.0 QString::operator=(QString const&)
1.0ms 0.0% 1.0 QRegExpMatchState::match(QChar const*, int, int, bool, bool, int)
1.0ms 0.0% 1.0 QList<QString>::~QList()
1.0ms 0.0% 1.0 QString::fromAscii_helper(char const*, int)
1.0ms 0.0% 0.0 free
40.0ms 0.5% 1.0 MessageModel::data(QModelIndex const&, int) const
21.0ms 0.2% 2.0 clear(QVariant::Private*)
8.0ms 0.1% 1.0 BufferInfo::bufferName() const
2.0ms 0.0% 2.0 Message::~Message()
2.0ms 0.0% 2.0 NetworkModel::networkId(BufferId) const
2.0ms 0.0% 2.0 QVariant::constData() const
1.0ms 0.0% 1.0 QMetaType::destroy(int, void*)
1.0ms 0.0% 1.0 Message qvariant_cast<Message>(QVariant const&)

}}}

Associated revisions

Revision 8677a82a (diff)
Added by Bombe over 6 years ago

Only create the regular expression for content/sender matches once.

Fixes #1227.

Revision 17fe4859 (diff)
Added by Bombe over 6 years ago

Only create the regular expression for content/sender matches once.

Fixes #1227.

History

#1 Updated by miohtama over 7 years ago

Also if it was unclear this happens only for my freenode.net buffers, not for other networks (ircnet, quakenet, irc.mozilla.org)

#2 Updated by miohtama over 7 years ago

Looks like clearing the ignore list resolved the issue.

#3 Updated by sandsmark over 7 years ago

I suspect that it is partly because the QRegExp is recreated for every line.

#4 Updated by jeroendeneef over 7 years ago

I also have the issue on Windows 7.
However, my ignore list is empty.

#5 Updated by Bombe over 6 years ago

I have moved the regex creation into the IgnoreListItem and that seems to have sped up the process of initally filling new buffers. However, there is still a noticable delay.

https://github.com/Bombe/quassel/tree/issue-1227

#6 Updated by Bombe over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset quassel|commit:8677a82a6664da67c67610d0b438ee17904b12fb.

Also available in: Atom PDF