Trying to understand some points in RecentDocs management
julien2412
serval2412 at yahoo.fr
Mon Feb 16 13:43:03 PST 2015
Hello,
Noticing tdf#71447 ("File menu takes long time to open when network files on
recent documents list are offline") about RecentDocs, I tried some gdb
session (let's take benefit of a debug+symbols build :-))
1) I noticed that AddDocumentToPickList was called at the opening and at the
close of a doc (+ some other events like saveAs)
See
http://opengrok.libreoffice.org/xref/core/sfx2/source/appl/sfxpicklist.cxx#406
=> I wonder in which case calling this method at close would be useful so
submitted https://gerrit.libreoffice.org/#/c/14507/
2) I noticed that this line in AddDocumentToPickList was always wrong:
178 if ( !pMed->IsUpdatePickList() )
see
http://opengrok.libreoffice.org/xref/core/sfx2/source/appl/sfxpicklist.cxx#178
I mean either the recent list or not, it seems we never return from
AddDocumentToPickList and so we generate thumbnail of the file (some lines
below)
Trying to investigate here, I must recognize I'm not sure what
"bUpdatePickList" variable from SfxMedium_Impl (see
http://opengrok.libreoffice.org/xref/core/sfx2/source/doc/docfile.cxx#174)
means:
a) boolean to indicate pick list should be updated
or b) boolean to indicate pick list has been updated
IsUpdatePickList shows a bit this confusion, does it mean: "is updated
PickList" or "must Update PickList" ?
3) I noticed that at each close, BackingWindow::initControls is called (see
opengrok.libreoffice.org/xref/core/sfx2/source/dialog/backingwindow.cxx#217)
and we never return early from here:
217 void BackingWindow::initControls()
218 {
219 if( mbInitControls )
220 return;
221
222 mbInitControls = true;
Indeed, by closing several times the same file (without any change in it
each time), the object address is different:
Ex:
bt 1:
#0 BackingWindow::initControls (this=0x738f9a0) at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingwindow.cxx:219
#1 0x00002aaaaeb7bf9c in BackingWindow::setOwningFrame (this=0x738f9a0,
xFrame=uno::Reference to ((anonymous namespace)::Frame *) 0x281aba8)
at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingwindow.cxx:460
#2 0x00002aaaaeb76de0 in (anonymous namespace)::BackingComp::attachFrame
(this=0x739c340, xFrame=uno::Reference to ((anonymous namespace)::Frame *)
0x281aba8)
at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingcomp.cxx:436
bt 2:
#0 BackingWindow::initControls (this=0x75dd990) at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingwindow.cxx:219
#1 0x00002aaaaeb7bf9c in BackingWindow::setOwningFrame (this=0x75dd990,
xFrame=uno::Reference to ((anonymous namespace)::Frame *) 0x281aba8)
at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingwindow.cxx:460
#2 0x00002aaaaeb76de0 in (anonymous namespace)::BackingComp::attachFrame
(this=0x6ebc610, xFrame=uno::Reference to ((anonymous namespace)::Frame *)
0x281aba8)
at
/home/julien/compile-libreoffice/libreoffice/sfx2/source/dialog/backingcomp.cxx:436
the main problem here is we call mpAllRecentThumbnails->Reload(); (line 260
of this same file) (see
http://opengrok.libreoffice.org/xref/core/sfx2/source/control/recentdocsview.cxx#158)
This method clears and reloads completely SvtHistoryOptions list
Sorry for this long description but thought it might pinpoint some locations
to improve for recent docs part.
Julien
--
View this message in context: http://nabble.documentfoundation.org/Trying-to-understand-some-points-in-RecentDocs-management-tp4140334.html
Sent from the Dev mailing list archive at Nabble.com.
More information about the LibreOffice
mailing list