Bulk-insert messages into the db (again)
authorManuel Nickschas <sputnick@quassel-irc.org>
Mon, 25 Oct 2010 09:09:43 +0000 (11:09 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 25 Oct 2010 09:13:50 +0000 (11:13 +0200)
commit5cab348de53cb3b994273c06fe69e1f799d247b4
tree9d2da22c8050fc6c544ba51a19bdba69c040f273
parent77a021d6d237abc3b54277584c1bedfecf0ceda2
Bulk-insert messages into the db (again)

This accidentally got slaughtered while moving to the new event backend. Now
messages are buffered in CoreSession until the event queue is empty, which means
that a bulk of incoming messages will completely be processed before inserting into
the database, resulting in a huge performance gain.

This buffers even more aggressive than the old version, as we process Qt events in between,
which means we'll receive and process any additional data from the socket before flushing the
message queue. The downside is that nothing will arrive in the client as long as your socket gets
flooded, but on the other hand, it will greatly reduce db I/O in such cases.
src/common/eventmanager.cpp
src/common/eventmanager.h
src/core/coresession.cpp
src/core/coresession.h