diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-06 17:48:35 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-06 17:48:35 +0100 |
commit | 94f6326237404545877c3d3df0edef44e28bcda9 (patch) | |
tree | b7edefc64a85cc3a41ad91e91013d3ad216bd35f /runtime/queue.c | |
parent | 28047567a2363f83b24b13108c626423dc1f1821 (diff) | |
download | rsyslog-94f6326237404545877c3d3df0edef44e28bcda9.tar.gz rsyslog-94f6326237404545877c3d3df0edef44e28bcda9.tar.bz2 rsyslog-94f6326237404545877c3d3df0edef44e28bcda9.zip |
queue: reduce CPU load for deserializing message properties
Linear runtime due to message order. Was quadratic before. However, not
a big overall improvement.
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 9113ccb5..802a9340 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -922,7 +922,7 @@ static rsRetVal qDeqDisk(qqueue_t *pThis, msg_t **ppMsg) { DEFiRet; iRet = objDeserializeWithMethods(ppMsg, (uchar*) "msg", 3, pThis->tVars.disk.pReadDeq, NULL, - NULL, msgConstructForDeserializer, msgConstructFinalizer, MsgSetProperty); + NULL, msgConstructForDeserializer, msgConstructFinalizer, MsgDeserialize); RETiRet; } @@ -940,7 +940,7 @@ qDelDiskCallbackDummy(void) } static rsRetVal qDelDisk(qqueue_t *pThis) { - obj_t *pDummyObj; /* another dummy, nothing is created */ + msg_t *pDummyObj; /* another dummy, nothing is created */ DEFiRet; int64 offsIn; @@ -948,7 +948,7 @@ static rsRetVal qDelDisk(qqueue_t *pThis) CHKiRet(strm.GetCurrOffset(pThis->tVars.disk.pReadDel, &offsIn)); CHKiRet(objDeserializeWithMethods(&pDummyObj, (uchar*) "msg", 3, pThis->tVars.disk.pReadDel, - NULL, NULL, qDelDiskCallbackDummy, qDelDiskCallbackDummy, qDelDiskCallbackDummy)); + NULL, NULL, qDelDiskCallbackDummy, qDelDiskCallbackDummy, objDeserializeDummy)); CHKiRet(strm.GetCurrOffset(pThis->tVars.disk.pReadDel, &offsOut)); /* This time it is a bit tricky: we free disk space only upon file deletion. So we need |