Bug 32293 - LibreOffice opens and reads the basis-link file ridiculously often
Summary: LibreOffice opens and reads the basis-link file ridiculously often
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-10 03:40 UTC by Don't use this account, use tml@iki.fi
Modified: 2012-06-28 07:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Experimental patch (7.34 KB, patch)
2010-12-10 12:00 UTC, Don't use this account, use tml@iki.fi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Don't use this account, use tml@iki.fi 2010-12-10 03:40:39 UTC
On Windows in the LibreOffice installation folder is a file called basis-link that contains the name of the "Basis" folder. (Which, as far as I know, always is constant in a certain version of LibreOffice, and certainly constant in each build of LibreOffice.) This is to "emulate" the corresponding symbolic link used on Unix.

This file is being opened and read over and over again during normal use of LibreOffice. Even just moving the cursor over the toolbars the file gets opened and read tens of times. Clearly, this is idiotic.

Although, that is not the only file that gets opened (and read, presumably) over and over again. Also bootstrap.ini for instance. Maybe this bug report should be more generic and cross-platform?
Comment 1 Rainer Bielefeld Retired 2010-12-10 08:21:23 UTC
Unconfirmed with "LibreOffice 3.3.0 RC1 - WIN XP German UI [OOO330m17 (build 3.3.0.1)]"
My LibO needs that File for startup (when I rename it, LibO can't be started), but after LibO has been launched I can rename that file in "C:\Programme\LibreOffice 3" to "basis-link_X_" and can although work without any problems.

@Tor Lillqvist:
What WIN? How did you check that the file has been read? Can you exclude that an Extension causes the problem?
Comment 2 Don't use this account, use tml@iki.fi 2010-12-10 08:28:08 UTC
Windows XP. I see the file being opened in the debugger (or if I add debugging printouts in osl_openFile). I have a default installation, no manually added extensions.

But maybe it is just hallucination.
Comment 3 Don't use this account, use tml@iki.fi 2010-12-10 12:00:11 UTC
Created attachment 40993 [details]
Experimental patch

This seems to help, basis-link is opened only once.

But that doesn't really have any immediately visible speedup effect, as I had hoped a bit. (I.e. it doesn't help bug #31716 )

The patch does a couple of things:

- remove the silliness in rtl_bootstrap_args_close() where in a debugging build no cache was kept after all... I wasted half a day wondering why the data for .ini files stored in the bootstrap_map hash table wasn't found after all the next time a lookup from that same .ini file was needed, but the file had to be loaded anew. Turns out this was intentional when bootstrap.cxx was compiled with OSL_DEBUG_LEVEL > 1. I don't understand the usefulness of this, so kill it.

- double the number of cached .ini files to 16.

- add a second hash table called link_map where the result of reading files referenced to by .link syntax in .ini files is kept. I.e., in practice the basis-link file. This indeed helps, the basis-link file is now read only once. But as I said, that didn't have any obvious speedup effect.

- drop superfluous newlines from OSL_TRACE output. OSL_TRACE by itself appends a newline.

But, I don't know if it is worth it to apply this patch. I would prefer to just get rid of the basis-link and ure-link thingie completely in LibreOffice.
Comment 4 Björn Michaelsen 2011-12-23 11:33:50 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 5 Rainer Bielefeld Retired 2011-12-23 23:28:42 UTC
@Tor
Can we close this one?
Comment 6 Don't use this account, use tml@iki.fi 2012-01-02 06:22:38 UTC
That depends on whether what the initial comment describes still happens or not.
Comment 7 Rainer Bielefeld Retired 2012-01-03 00:21:02 UTC
@Tor
Exactly that was the question behind Comment 5.
Comment 8 Caolán McNamara 2012-06-28 07:59:53 UTC
The whole basis/brand split got undone. So AFAIK this is now redundant.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=b786a33cfdca2e8a4114ddef0340e0e0628dd09c