[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 2 commits - desktop/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Thu Apr 25 04:11:23 UTC 2019


 desktop/source/lib/init.cxx |  149 ++++++++++++++++++++++++++++++++++++++------
 1 file changed, 132 insertions(+), 17 deletions(-)

New commits:
commit a34a4aaeca3713acea7b1d59632f1aa6e0f50fde
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Tue Apr 16 23:01:50 2019 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Apr 25 06:01:44 2019 +0200

    lok: add profile zones.
    
    NB. outside of the often contended SolarMutexGuard.
    
    Change-Id: Ieb651e2ed4349e692010a7588721f461af7d2b5b
    Reviewed-on: https://gerrit.libreoffice.org/70848
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 785b45d0d71c..ece913b25e80 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -941,6 +941,8 @@ void CallbackFlushHandler::callback(const int type, const char* payload, void* d
 
 void CallbackFlushHandler::queue(const int type, const char* data)
 {
+    comphelper::ProfileZone aZone("CallbackFlushHander::queue");
+
     CallbackData aCallbackData(type, (data ? data : "(nil)"));
     const std::string& payload = aCallbackData.PayloadString;
     SAL_INFO("lok", "Queue: " << type << " : " << payload);
@@ -1394,6 +1396,8 @@ void CallbackFlushHandler::queue(const int type, const char* data)
 
 void CallbackFlushHandler::Invoke()
 {
+    comphelper::ProfileZone aZone("CallbackFlushHander::Invoke");
+
     if (m_pCallback && !m_bEventLatch)
     {
         std::unique_lock<std::mutex> lock(m_mutex);
@@ -1478,6 +1482,8 @@ void CallbackFlushHandler::removeViewStates(int viewId)
 
 static void doc_destroy(LibreOfficeKitDocument *pThis)
 {
+    comphelper::ProfileZone aZone("doc_destroy");
+
     SolarMutexGuard aGuard;
 
     LibLODocument_Impl *pDocument = static_cast<LibLODocument_Impl*>(pThis);
@@ -1567,6 +1573,8 @@ static LibreOfficeKitDocument* lo_documentLoad(LibreOfficeKit* pThis, const char
 
 static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis, const char* pURL, const char* pOptions)
 {
+    comphelper::ProfileZone aZone("lo_documentLoadWithOptions");
+
     SolarMutexGuard aGuard;
 
     LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
@@ -1678,6 +1686,8 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
 
 static int lo_runMacro(LibreOfficeKit* pThis, const char *pURL)
 {
+    comphelper::ProfileZone aZone("lo_runMacro");
+
     SolarMutexGuard aGuard;
 
     LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
@@ -1766,12 +1776,14 @@ static int lo_runMacro(LibreOfficeKit* pThis, const char *pURL)
 }
 
 static bool lo_signDocument(LibreOfficeKit* /*pThis*/,
-                                       const char* pURL,
-                                       const unsigned char* pCertificateBinary,
-                                       const int nCertificateBinarySize,
-                                       const unsigned char* pPrivateKeyBinary,
-                                       const int nPrivateKeyBinarySize)
+                            const char* pURL,
+                            const unsigned char* pCertificateBinary,
+                            const int nCertificateBinarySize,
+                            const unsigned char* pPrivateKeyBinary,
+                            const int nPrivateKeyBinarySize)
 {
+    comphelper::ProfileZone aZone("lo_signDocument");
+
     OUString aURL(getAbsoluteURL(pURL));
     if (aURL.isEmpty())
        return false;
@@ -1849,6 +1861,8 @@ static void lo_registerCallback (LibreOfficeKit* pThis,
 
 static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const char* pFormat, const char* pFilterOptions)
 {
+    comphelper::ProfileZone aZone("doc_saveAs");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2150,6 +2164,8 @@ static void doc_iniUnoCommands ()
 
 static int doc_getDocumentType (LibreOfficeKitDocument* pThis)
 {
+    comphelper::ProfileZone aZone("doc_getDocumentType");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2190,6 +2206,8 @@ static int doc_getDocumentType (LibreOfficeKitDocument* pThis)
 
 static int doc_getParts (LibreOfficeKitDocument* pThis)
 {
+    comphelper::ProfileZone aZone("doc_getParts");
+
     SolarMutexGuard aGuard;
 
     ITiledRenderable* pDoc = getTiledRenderable(pThis);
@@ -2204,6 +2222,8 @@ static int doc_getParts (LibreOfficeKitDocument* pThis)
 
 static int doc_getPart (LibreOfficeKitDocument* pThis)
 {
+    comphelper::ProfileZone aZone("doc_getPart");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2220,6 +2240,8 @@ static int doc_getPart (LibreOfficeKitDocument* pThis)
 
 static void doc_setPart(LibreOfficeKitDocument* pThis, int nPart)
 {
+    comphelper::ProfileZone aZone("doc_setPart");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2236,6 +2258,8 @@ static void doc_setPart(LibreOfficeKitDocument* pThis, int nPart)
 
 static char* doc_getPartInfo(LibreOfficeKitDocument* pThis, int nPart)
 {
+    comphelper::ProfileZone aZone("doc_getPartInfo");
+
     SolarMutexGuard aGuard;
     ITiledRenderable* pDoc = getTiledRenderable(pThis);
     if (!pDoc)
@@ -2286,6 +2310,8 @@ static void doc_moveSelectedParts(LibreOfficeKitDocument* pThis, int nPosition,
 
 static char* doc_getPartPageRectangles(LibreOfficeKitDocument* pThis)
 {
+    comphelper::ProfileZone aZone("doc_getPartPageRectangles");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2307,6 +2333,8 @@ static char* doc_getPartPageRectangles(LibreOfficeKitDocument* pThis)
 
 static char* doc_getPartName(LibreOfficeKitDocument* pThis, int nPart)
 {
+    comphelper::ProfileZone aZone("doc_getPartName");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2328,6 +2356,8 @@ static char* doc_getPartName(LibreOfficeKitDocument* pThis, int nPart)
 
 static char* doc_getPartHash(LibreOfficeKitDocument* pThis, int nPart)
 {
+    comphelper::ProfileZone aZone("doc_getPartHash");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2350,6 +2380,8 @@ static char* doc_getPartHash(LibreOfficeKitDocument* pThis, int nPart)
 static void doc_setPartMode(LibreOfficeKitDocument* pThis,
                             int nPartMode)
 {
+    comphelper::ProfileZone aZone("doc_setPartMode");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2391,6 +2423,8 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
                           const int nTilePosX, const int nTilePosY,
                           const int nTileWidth, const int nTileHeight)
 {
+    comphelper::ProfileZone aZone("doc_paintTile");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2518,6 +2552,8 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
                               const int nTilePosX, const int nTilePosY,
                               const int nTileWidth, const int nTileHeight)
 {
+    comphelper::ProfileZone aZone("doc_paintPartTile");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2613,6 +2649,8 @@ static void doc_getDocumentSize(LibreOfficeKitDocument* pThis,
                                 long* pWidth,
                                 long* pHeight)
 {
+    comphelper::ProfileZone aZone("doc_getDocumentSize");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2633,6 +2671,8 @@ static void doc_getDocumentSize(LibreOfficeKitDocument* pThis,
 static void doc_initializeForRendering(LibreOfficeKitDocument* pThis,
                                        const char* pArguments)
 {
+    comphelper::ProfileZone aZone("doc_initializeForRendering");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2749,6 +2789,8 @@ static char* getRulerState(LibreOfficeKitDocument* pThis)
 
 static void doc_postKeyEvent(LibreOfficeKitDocument* pThis, int nType, int nCharCode, int nKeyCode)
 {
+    comphelper::ProfileZone aZone("doc_postKeyEvent");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2765,6 +2807,8 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* pThis, int nType, int nChar
 
 static void doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsigned nWindowId, int nType, const char* pText)
 {
+    comphelper::ProfileZone aZone("doc_postWindowExtTextInputEvent");
+
     SolarMutexGuard aGuard;
     VclPtr<vcl::Window> pWindow;
     if (nWindowId == 0)
@@ -2804,6 +2848,8 @@ static void doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsig
 
 static void doc_postWindowKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWindowId, int nType, int nCharCode, int nKeyCode)
 {
+    comphelper::ProfileZone aZone("doc_postWindowKeyEvent");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2833,6 +2879,8 @@ static void doc_postWindowKeyEvent(LibreOfficeKitDocument* /*pThis*/, unsigned n
 
 static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOutput)
 {
+    comphelper::ProfileZone aZone("doc_renderShapeSelection");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -2936,6 +2984,8 @@ public:
 
 static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pCommand, const char* pArguments, bool bNotifyWhenFinished)
 {
+    comphelper::ProfileZone aZone("doc_postUnoCommand");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3046,6 +3096,8 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pComma
 
 static void doc_postMouseEvent(LibreOfficeKitDocument* pThis, int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
 {
+    comphelper::ProfileZone aZone("doc_postMouseEvent");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3062,6 +3114,8 @@ static void doc_postMouseEvent(LibreOfficeKitDocument* pThis, int nType, int nX,
 
 static void doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWindowId, int nType, int nX, int nY, int nCount, int nButtons, int nModifier)
 {
+    comphelper::ProfileZone aZone("doc_postWindowMouseEvent");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3100,6 +3154,8 @@ static void doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, unsigned
 
 static void doc_postWindowGestureEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWindowId, const char* pType, int nX, int nY, int nOffset)
 {
+    comphelper::ProfileZone aZone("doc_postWindowGestureEvent");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3137,6 +3193,8 @@ static void doc_postWindowGestureEvent(LibreOfficeKitDocument* /*pThis*/, unsign
 
 static void doc_setTextSelection(LibreOfficeKitDocument* pThis, int nType, int nX, int nY)
 {
+    comphelper::ProfileZone aZone("doc_setTextSelection");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3153,6 +3211,8 @@ static void doc_setTextSelection(LibreOfficeKitDocument* pThis, int nType, int n
 
 static char* doc_getTextSelection(LibreOfficeKitDocument* pThis, const char* pMimeType, char** pUsedMimeType)
 {
+    comphelper::ProfileZone aZone("doc_getTextSelection");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3183,6 +3243,8 @@ static char* doc_getTextSelection(LibreOfficeKitDocument* pThis, const char* pMi
 
 static bool doc_paste(LibreOfficeKitDocument* pThis, const char* pMimeType, const char* pData, size_t nSize)
 {
+    comphelper::ProfileZone aZone("doc_paste");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3220,6 +3282,8 @@ static bool doc_paste(LibreOfficeKitDocument* pThis, const char* pMimeType, cons
 
 static void doc_setGraphicSelection(LibreOfficeKitDocument* pThis, int nType, int nX, int nY)
 {
+    comphelper::ProfileZone aZone("doc_setGraphicSelection");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3236,6 +3300,8 @@ static void doc_setGraphicSelection(LibreOfficeKitDocument* pThis, int nType, in
 
 static void doc_resetSelection(LibreOfficeKitDocument* pThis)
 {
+    comphelper::ProfileZone aZone("doc_resetSelection");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3618,6 +3684,8 @@ static char* getTrackedChangeAuthors(LibreOfficeKitDocument* pThis)
 
 static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCommand)
 {
+    comphelper::ProfileZone aZone("doc_getCommandValues");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3790,6 +3858,8 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo
 static void doc_setClientZoom(LibreOfficeKitDocument* pThis, int nTilePixelWidth, int nTilePixelHeight,
         int nTileTwipWidth, int nTileTwipHeight)
 {
+    comphelper::ProfileZone aZone("doc_setClientZoom");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3806,6 +3876,8 @@ static void doc_setClientZoom(LibreOfficeKitDocument* pThis, int nTilePixelWidth
 
 static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int nY, int nWidth, int nHeight)
 {
+    comphelper::ProfileZone aZone("doc_setClientVisibleArea");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3823,6 +3895,8 @@ static void doc_setClientVisibleArea(LibreOfficeKitDocument* pThis, int nX, int
 
 static void doc_setOutlineState(LibreOfficeKitDocument* pThis, bool bColumn, int nLevel, int nIndex, bool bHidden)
 {
+    comphelper::ProfileZone aZone("doc_setOutlineState");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3840,6 +3914,8 @@ static void doc_setOutlineState(LibreOfficeKitDocument* pThis, bool bColumn, int
 static int doc_createViewWithOptions(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/,
                                      const char* pOptions)
 {
+    comphelper::ProfileZone aZone("doc_createView");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3863,6 +3939,8 @@ static int doc_createView(LibreOfficeKitDocument* pThis)
 
 static void doc_destroyView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int nId)
 {
+    comphelper::ProfileZone aZone("doc_destroyView");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3872,6 +3950,8 @@ static void doc_destroyView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis
 
 static void doc_setView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int nId)
 {
+    comphelper::ProfileZone aZone("doc_setView");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3881,6 +3961,8 @@ static void doc_setView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/,
 
 static int doc_getView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/)
 {
+    comphelper::ProfileZone aZone("doc_getView");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3890,6 +3972,8 @@ static int doc_getView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/)
 
 static int doc_getViewsCount(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/)
 {
+    comphelper::ProfileZone aZone("doc_getViewsCount");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3899,6 +3983,8 @@ static int doc_getViewsCount(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThi
 
 static bool doc_getViewIds(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int* pArray, size_t nSize)
 {
+    comphelper::ProfileZone aZone("doc_getViewsIds");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3908,6 +3994,8 @@ static bool doc_getViewIds(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*
 
 static void doc_setViewLanguage(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int nId, const char* language)
 {
+    comphelper::ProfileZone aZone("doc_setViewLanguage");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -3916,11 +4004,13 @@ static void doc_setViewLanguage(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*p
 }
 
 unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/,
-                    const char* pFontName,
-                    const char* pChar,
-                    int* pFontWidth,
-                    int* pFontHeight)
+                              const char* pFontName,
+                              const char* pChar,
+                              int* pFontWidth,
+                              int* pFontHeight)
 {
+    comphelper::ProfileZone aZone("doc_renderFont");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -4034,6 +4124,8 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKW
                                const int nWidth, const int nHeight,
                                const double fDPIScale)
 {
+    comphelper::ProfileZone aZone("doc_paintWindowDPI");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -4098,6 +4190,8 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKW
 
 static void doc_postWindow(LibreOfficeKitDocument* /*pThis*/, unsigned nLOKWindowId, int nAction)
 {
+    comphelper::ProfileZone aZone("doc_postWindow");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -4123,6 +4217,8 @@ static bool doc_insertCertificate(LibreOfficeKitDocument* pThis,
                                   const unsigned char* pCertificateBinary, const int nCertificateBinarySize,
                                   const unsigned char* pPrivateKeyBinary, const int nPrivateKeySize)
 {
+    comphelper::ProfileZone aZone("doc_insertCertificate");
+
     if (!xContext.is())
         return false;
 
@@ -4196,6 +4292,8 @@ static bool doc_insertCertificate(LibreOfficeKitDocument* pThis,
 static bool doc_addCertificate(LibreOfficeKitDocument* pThis,
                                   const unsigned char* pCertificateBinary, const int nCertificateBinarySize)
 {
+    comphelper::ProfileZone aZone("doc_addCertificate");
+
     if (!xContext.is())
         return false;
 
@@ -4254,6 +4352,8 @@ static bool doc_addCertificate(LibreOfficeKitDocument* pThis,
 
 static int doc_getSignatureState(LibreOfficeKitDocument* pThis)
 {
+    comphelper::ProfileZone aZone("doc_getSignatureState");
+
     LibLODocument_Impl* pDocument = static_cast<LibLODocument_Impl*>(pThis);
 
     if (!pDocument->mxComponent.is())
@@ -4276,6 +4376,8 @@ static int doc_getSignatureState(LibreOfficeKitDocument* pThis)
 
 static char* lo_getError (LibreOfficeKit *pThis)
 {
+    comphelper::ProfileZone aZone("lo_getError");
+
     SolarMutexGuard aGuard;
 
     LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
@@ -4332,6 +4434,8 @@ static char* lo_getFilterTypes(LibreOfficeKit* pThis)
 
 static void lo_setOptionalFeatures(LibreOfficeKit* pThis, unsigned long long const features)
 {
+    comphelper::ProfileZone aZone("lo_setOptionalFeatures");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -4351,6 +4455,8 @@ static void lo_setOptionalFeatures(LibreOfficeKit* pThis, unsigned long long con
 static void lo_setDocumentPassword(LibreOfficeKit* pThis,
         const char* pURL, const char* pPassword)
 {
+    comphelper::ProfileZone aZone("lo_setDocumentPassword");
+
     SolarMutexGuard aGuard;
     if (gImpl)
         gImpl->maLastExceptionMsg.clear();
@@ -4481,7 +4587,7 @@ static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit:
 /// Used only by LibreOfficeKit when used by Online to pre-initialize
 static void preloadData()
 {
-    std::cerr << "Preloading dictionaries: ";
+    comphelper::ProfileZone aZone("preload data");
 
     // Create user profile in the temp directory for loading the dictionaries
     OUString sUserPath;
@@ -4501,6 +4607,7 @@ static void preloadData()
         css::linguistic2::LinguServiceManager::create(comphelper::getProcessComponentContext());
     css::uno::Reference<linguistic2::XSpellChecker> xSpellChecker(xLngSvcMgr->getSpellChecker());
 
+    std::cerr << "Preloading dictionaries: ";
     css::uno::Reference<linguistic2::XSupportedLocales> xSpellLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
     uno::Sequence< css::lang::Locale > aLocales = xSpellLocales->getLocales();
     for (auto &it : aLocales)
@@ -4742,8 +4849,11 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
 
             if (eStage == PRE_INIT)
             {
-                std::cerr << "Init vcl\n";
-                InitVCL();
+                {
+                    comphelper::ProfileZone aInit("Init vcl");
+                    std::cerr << "Init vcl\n";
+                    InitVCL();
+                }
 
                 // pre-load all component libraries.
                 if (!xContext.is())
@@ -4763,10 +4873,15 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
                 // 1) defaultBootstrap_InitialComponentContext()
                 // 2) comphelper::setProcessServiceFactory(xSFactory);
                 // 3) InitVCL()
-                aService->initialize({css::uno::makeAny<OUString>("preload")});
-                // Force load some modules
-                VclBuilder::preload();
-                VclAbstractDialogFactory::Create();
+                {
+                    comphelper::ProfileZone aInit("preload");
+                    aService->initialize({css::uno::makeAny<OUString>("preload")});
+                }
+                { // Force load some modules
+                    comphelper::ProfileZone aInit("preload modules");
+                    VclBuilder::preload();
+                    VclAbstractDialogFactory::Create();
+                }
 
                 preloadData();
 
commit bf440a2f97b2b02a195f8e44e6d76cfbd9fcf905
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Apr 15 13:16:53 2019 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Apr 25 06:01:44 2019 +0200

    lok: rename - emitted as events not on stdout now.
    
    Change-Id: Ie57c34eff1d917fada4e10e4b88b27adf8a34d1a
    Reviewed-on: https://gerrit.libreoffice.org/70788
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a3577809aa45..785b45d0d71c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4603,7 +4603,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
 
     // Did we do a pre-initialize
     static bool bPreInited = false;
-    static bool bProfileZones = getenv("SAL_PROFILEZONE_STDOUT") != nullptr;
+    static bool bProfileZones = getenv("SAL_PROFILEZONE_EVENTS") != nullptr;
 
     // What stage are we at ?
     if (pThis == nullptr)


More information about the Libreoffice-commits mailing list