[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sun Mar 26 05:05:32 UTC 2017
wsd/DocumentBroker.cpp | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit a190084b43d6e4b2bedb3ddcfa6376db1f5b161c
Author: Ashod Nakashian <ashod.nakashian at 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 <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at 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)
More information about the Libreoffice-commits
mailing list