[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - desktop/source

Tor Lillqvist (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 16 11:09:38 UTC 2021


 desktop/source/lib/init.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 735e9a2563ccd5e50c813afb1a7b8576e74963bd
Author:     Tor Lillqvist <tml at collabora.com>
AuthorDate: Tue Jun 29 15:04:58 2021 +0300
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Jul 16 13:09:02 2021 +0200

    Avoid accumulating a huge number of Trace Events before calling the callback
    
    Don't use only the five second timer to flush the buffer. Set a limit
    on the number of accumulated events, too.
    
    Change-Id: I075028ce653d89cf099d91ce0d4d97c1361a3bb4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118205
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118933
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 98adaa61e00d..8922176af3a4 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -212,7 +212,13 @@ public:
         SetTimeout(dumpTimeoutMS);
         Start();
     }
+
     virtual void Invoke() override
+    {
+        flushRecordings();
+    }
+
+    static void flushRecordings()
     {
         const css::uno::Sequence<OUString> aEvents =
             comphelper::TraceEvent::getRecordingAndClear();
@@ -3837,6 +3843,7 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c
     {
         if (strcmp(pValue, "start") == 0)
         {
+            comphelper::TraceEvent::setBufferSizeAndCallback(100, TraceEventDumper::flushRecordings);
             comphelper::TraceEvent::startRecording();
             if (traceEventDumper == nullptr)
                 traceEventDumper = new TraceEventDumper();


More information about the Libreoffice-commits mailing list