Menu

#9 Performance Issue when Logger is missing

open
nobody
5
2009-05-24
2009-05-24
No

I'm not acutally aware of the logging-mechanism used in lipiTK but when profiling a little I came across

ostream& LTKLoggerUtil::logMessage(LTKLogger::EDebugLevel logLevel, string inStr, int lineNumber)

which is invoked at every LOG(..) in the App. The Problem is that if
m_libHandleLogger = m_ptrOSUtil->getLibraryHandle(LOGGER_MODULE_STR);
(in the same function)
always returns NULL because there is no library handle to get, a significant performance loss occures due to the syscall which must therefor be performed for every LOG(..) and not just once.
I fixed it by
return m_emptyStream;
on the top (as i do not need logging) but this is of course just a workaround.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB