diff options
author | Sergey Sharybin <sergey@blender.org> | 2020-12-01 16:52:08 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2020-12-01 16:55:22 +0300 |
commit | 4c92fb671539bc936fab9177822c889ab372434d (patch) | |
tree | 16e41dccba0844c2108f8ffe9eef8af10aee0d4a /intern/libmv | |
parent | c21265b29ed98ad504ffccbf2f1f0b4b7a07f769 (diff) |
Libmv: Tweak default logging verbosity level
Log to verbosity level 1 rather than INFO severity.
Avoids a lot of overhead coming from construction of the INFO stream
and improves performance and threadability of code which uses logging.
This makes tracking of 250 frames of a track of default settings to
drop down from 0.6sec to 0.4sec.
Diffstat (limited to 'intern/libmv')
-rw-r--r-- | intern/libmv/libmv/logging/logging.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/intern/libmv/libmv/logging/logging.h b/intern/libmv/libmv/logging/logging.h index ce7f3201516..0f4f99e3895 100644 --- a/intern/libmv/libmv/logging/logging.h +++ b/intern/libmv/libmv/logging/logging.h @@ -23,6 +23,20 @@ #include <glog/logging.h> -#define LG LOG(INFO) +// Note on logging severity and verbosity level. +// +// Reserve LOG(INFO) for messages which are always to be put to log and don't +// use the INFO severity for the debugging/troubleshooting type of messages. +// Some reasoning behind: +// +// - Library integration would want to disable "noisy" messages coming from +// algorithms. +// +// - It is not possible to disable INFO severity entirely: there is enough +// of preparation being done for the message stream. What is even worse +// is that such stream preparation causes measurable time spent in spin +// lock, ruining multi-threading. + +#define LG VLOG(1) #endif // LIBMV_LOGGING_LOGGING_H |