Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework QgsDebugMsgLevel to avoid construction of strings which
won't be logged at the current debug level Instead of always constructing debug strings, and then potentially ignoring them if they fall outside the current debug level, we instead rework the QgsDebugMsgLevel macro so that strings are only ever constructed when they WILL be logged. This avoids the (often very expensive) string construction for debug messages whenever the results won't be used. It allows low level (i.e. level 3 or 4) debug messages to be safely used without incurring huge slowdowns in debug builds. TODO: ensure we only ever use QgsDebugMsg() for ERROR reporting, and move all other debugging calls to QgsDebugMsgLevel instead. Credit for original idea goes to @wonder-sk!
- Loading branch information