wsd/DocumentBroker.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit a190084b43d6e4b2bedb3ddcfa6376db1f5b161c Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sat Mar 25 13:57:47 2017 -0400 wsd: log document loading stats only the first time Since these numbers are against the thread start time, they aren't useful for loading subsequent views. Change-Id: Ib5cf580282841e5b2dbb71c7db4a1868f7eb29e1 Reviewed-on: https://gerrit.libreoffice.org/35704 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 2f542b14..eb204b8d 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -617,10 +617,13 @@ bool DocumentBroker::saveToStorageInternal(const std::string& sessionId, void DocumentBroker::setLoaded() { - _isLoaded = true; - _loadDuration = std::chrono::duration_cast<std::chrono::milliseconds>( - std::chrono::steady_clock::now() - _threadStart); - LOG_TRC("Document loaded in " << _loadDuration.count() << "ms"); + if (!_isLoaded) + { + _isLoaded = true; + _loadDuration = std::chrono::duration_cast<std::chrono::milliseconds>( + std::chrono::steady_clock::now() - _threadStart); + LOG_TRC("Document loaded in " << _loadDuration.count() << "ms"); + } } bool DocumentBroker::autoSave(const bool force) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits