[Upstream] Menu entries should use Exec=/bin/sh /usr/lib/libreoffice/program/soffice -writer %U

Bug #452043 reported by Jérôme
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Won't Fix
Medium
OpenOffice
Invalid
Undecided
Unassigned
Nominated for 3.1 by Jérôme
libreoffice (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Karmic by Jérôme
openoffice.org (Ubuntu)
Won't Fix
Wishlist
Unassigned
Nominated for Karmic by Jérôme

Bug Description

Binary package hint: openoffice.org

The current menu entries have indirect invocation. This infers intermediate dash shell invocation and thus slowdowns the startup. Moreover, not using direct file path infers a useless additional load due to the lookup time.

With the Ubuntu 11.04 (natty) package, the menu entry description provides the
below command :
---
j@lu64:~$ grep -i exec /usr/share/applications/libreoffice-writer.desktop
Exec=libreoffice -writer %U
Exec=libreoffice -writer %U
j@lu64:~$
---

The above command line is equivalent to the below pseudo instructions :
---
j@lu64:~$ which libreoffice
/usr/bin/libreoffice
j@lu64:~$ file /usr/bin/libreoffice
/usr/bin/libreoffice: POSIX shell script text executable
j@lu64:~$ cat /usr/bin/libreoffice
#!/bin/sh
/usr/lib/libreoffice/program/soffice "$@"
j@lu64:~$ file /usr/lib/libreoffice/program/soffice
/usr/lib/libreoffice/program/soffice: POSIX shell script text executable
j@lu64:~$ /bin/sh /usr/lib/libreoffice/program/soffice -writer %U
---

I think the /usr/share/applications/libreoffice-writer.desktop file should
provide the below command line instead :
---
Exec=/bin/sh /usr/lib/libreoffice/program/soffice -writer %U
---

Removing all those indirect calls speeds up the cold startup time by more than 20%.

ProblemType: Bug
Architecture: i386
Date: Thu Oct 15 11:56:54 2009
Dependencies:

DistroRelease: Ubuntu 9.10
Package: openoffice.org-common 1:3.1.1-4ubuntu1 [modified: var/lib/openoffice/basis3.1/share/config/javasettingsunopkginstall.xml]
PackageArchitecture: all
ProcEnviron:
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.46-generic
SourcePackage: openoffice.org
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Jérôme (jerome-bouat) wrote :
Chris Cheney (ccheney)
Changed in openoffice.org (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
summary: - menu entries should use /usr/lib/openoffice/program/soffice
+ [ooo-build] menu entries should use /usr/lib/openoffice/program/soffice
Revision history for this message
Jérôme (jerome-bouat) wrote : Re: [ooo-build] menu entries should use /usr/lib/openoffice/program/soffice

Below are the cold start duration (after the computer just restarted, the services like cron are stopped of course).

command: ooffice -writer
duration: 22 seconds (2 tries; 1% variation against the average)

command: /bin/dash /usr/lib/openoffice/program/soffice -writer
duration: 17 seconds (2 tries; <1% variation against the average)

The last command shorten the cold startup time by more than 20% !

Revision history for this message
Jérôme (jerome-bouat) wrote :

For example, in order to fix this bug for OO Writer, you just have to perform the below change for the /usr/lib/openoffice/share/xdg/writer.desktop file:
--------
< Exec=ooffice -writer %U
---
> Exec=/bin/dash /usr/lib/openoffice/program/soffice -writer %U
--------

Why this bug fix can't be applied right now ?

Revision history for this message
Chris Cheney (ccheney) wrote :

Because we are long past freeze, Ubuntu 9.10 releases tomorrow.

Revision history for this message
Jérôme (jerome-bouat) wrote :

I notified the upstream packaging:
http://qa.openoffice.org/issues/show_bug.cgi?id=106386

However I think it will not impact the Ubuntu repackaging which has to be fixed separately.

Chris Cheney (ccheney)
tags: added: karmic
Revision history for this message
Jérôme (jerome-bouat) wrote :

Still occurs on Lucid.

It appears on amd64 too.

tags: removed: karmic
Jérôme (jerome-bouat)
tags: added: lucid
Changed in openoffice.org (Ubuntu):
status: Triaged → Won't Fix
penalvch (penalvch)
Changed in openoffice:
status: New → Invalid
Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote : migrating packaging from OpenOffice.org to Libreoffice

[This is an automated message.]
There are no new official OpenOffice.org releases in Ubuntu packaging anymore => Won't Fix

If the problem persists, please mark this bug as "also affects project Libreoffice" or "also affects distribution Libreoffice (Ubuntu)" if that has not happened already.

Please leave references to upstream OpenOffice.org bugs in place to allow cross pollination.

Revision history for this message
In , Jérôme (jerome-bouat) wrote :

With the Ubuntu 11.04 (natty) package, the menu entry description provides the below command :
---
j@lu64:~$ grep -i exec /usr/share/applications/libreoffice-writer.desktop
Exec=libreoffice -writer %U
Exec=libreoffice -writer %U
j@lu64:~$
---

The above command line is equivalent to the below pseudo instructions :
---
j@lu64:~$ which libreoffice
/usr/bin/libreoffice
j@lu64:~$ file /usr/bin/libreoffice
/usr/bin/libreoffice: POSIX shell script text executable
j@lu64:~$ cat /usr/bin/libreoffice
#!/bin/sh
/usr/lib/libreoffice/program/soffice "$@"
j@lu64:~$ file /usr/lib/libreoffice/program/soffice
/usr/lib/libreoffice/program/soffice: POSIX shell script text executable
j@lu64:~$ /bin/sh /usr/lib/libreoffice/program/soffice -writer %U
---

I think the /usr/share/applications/libreoffice-writer.desktop file should provide the below command line instead :
---
Exec=/bin/sh /usr/lib/libreoffice/program/soffice -writer %U
---

The below Ubuntu bug report shows that removing all those indirect calls speeds
up the cold startup time by more than 20% :

https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/452043

penalvch (penalvch)
summary: - [ooo-build] menu entries should use /usr/lib/openoffice/program/soffice
+ [Upstream] Menu entries should use Exec=/bin/sh
+ /usr/lib/libreoffice/program/soffice -writer %U
description: updated
Changed in df-libreoffice:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

[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

Changed in df-libreoffice:
status: Confirmed → Incomplete
Revision history for this message
In , Jérôme (jerome-bouat) wrote :

The new 3.5.0rc2 version decreased the number of indirection. However we could go further.

Menu entry :
---
j@j-K64:~$ grep -i exec /usr/share/applications/libreoffice3.5-writer.desktop
Exec=libreoffice3.5 --writer %U
j@j-K64:~$
---

The above command line is equivalent to the below pseudo instructions :
---
j@j-K64:~$ which libreoffice3.5
/usr/bin/libreoffice3.5
j@j-K64:~$ file /usr/bin/libreoffice3.5
/usr/bin/libreoffice3.5: symbolic link to `/opt/libreoffice3.5/program/soffice'
j@j-K64:~$ file /opt/libreoffice3.5/program/soffice
/opt/libreoffice3.5/program/soffice: POSIX shell script text executable
j@j-K64:~$ head -1 /opt/libreoffice3.5/program/soffice
#!/bin/sh
j@j-K64:~$ /bin/sh /opt/libreoffice3.5/program/soffice --writer %U
---

I think the /usr/share/applications/libreoffice3.5-writer.desktop file should
provide the below command line instead :
---
Exec=/bin/sh /opt/libreoffice3.5/program/soffice --writer %U
---

Changed in df-libreoffice:
status: Incomplete → Confirmed
Revision history for this message
In , Jérôme (jerome-bouat) wrote :

The bug still occurs with 3.5.0 RC3 (2012-02-04).

Revision history for this message
In , Samuel Mehrbrodt (sam92) wrote :

I don't think this is a bug in LibreOffice. LibreOffice can be installed in different places and this should not be hard-coded.

Changed in df-libreoffice:
status: Confirmed → Won't Fix
Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote :

closing as per upstream

Changed in libreoffice (Ubuntu):
status: New → Invalid
Revision history for this message
Jérôme (jerome-bouat) wrote :

This isn't a LibreOffice bug. This is a bug of the packaging of LibreOffice into Ubuntu.

Revision history for this message
In , Jérôme (jerome-bouat) wrote :

I think the installation process should deal with the final path of the programs.

For example, you keep the symbolic link /usr/bin/libreoffice which points to /usr/lib/libreoffice/program/soffice.

However, the /usr/share/applications/libreoffice-writer.desktop would have the below Exec mapping :
---
Exec=/bin/sh /usr/lib/libreoffice/program/soffice -writer %U
---

Anyway you have to deal with the final path when you create the symbolic link.

Maybe the tools which package the archives/installer are already dealing with this indirection.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.