perf(logging): reduce logging overhead in hot paths#9990
Open
qoole wants to merge 1 commit intonextcloud:masterfrom
Open
perf(logging): reduce logging overhead in hot paths#9990qoole wants to merge 1 commit intonextcloud:masterfrom
qoole wants to merge 1 commit intonextcloud:masterfrom
Conversation
- Remove dead debug lambda in PUTFileJob::start() that constructed a temporary QLoggingCategory on every upload progress tick. The signal is already connected to the proper handler on the next line. - Downgrade setFileRecord's 28-field log from qCInfo to qCDebug so it no longer fires in production on every file record update. - Add QtInfoMsg default to 3 Q_LOGGING_CATEGORY declarations that were missing it, preventing debug-level output from being active by default. - Remove tr() and QString::number() allocations from a qCDebug call in usermodel.cpp quota update path. Signed-off-by: Qoole <2862661+qoole@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reduces logging overhead in several frequently-hit code paths:
PUTFileJob::start(): removes a dead debug lambda that constructed a temporaryQLoggingCategoryon every upload progress tick. The progress signal is already connected to the proper handler on the next line, so the lambda was a no-op that ran on every chunk.SyncJournalDb::setFileRecord: downgrades the 28-field log line fromqCInfotoqCDebugso it no longer fires in production on every file record update. With large syncs this generates a substantial amount of log spam at info level.Q_LOGGING_CATEGORYdefaults: addsQtInfoMsgdefault to three category declarations that were missing it, preventing debug-level output from being active by default in those modules.usermodel.cppquota update: removestr()andQString::number()allocations from aqCDebugcall that runs on every quota refresh, even when debug logging is not enabled.Checklist
AI (if applicable)