g-p's use of gettext uses more memory that needed

Bug #45913 reported by Ben Maurer on 2006-05-21
12
Affects Status Importance Assigned to Milestone
gnome-panel (Ubuntu)
Wishlist
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-panel

gnome-panel loads about 1.2 MB of RSS via .mo files for the purpose of localizing menu names:

bmaurer@broomstick:~$ ./smem.pl `pidof gnome-panel` | grep langpack | awk '{ sum += $3 } END {print sum}'
1196

While this memory is in theory shared (it's not private memory), for most of the .mo files, g-p is the only consumer of the file. This causes extra disk access during boot, and also consumes excess memory.

Sebastien Bacher (seb128) wrote :

Thanks for your bug. Is there an easy way to avoid that?

Changed in gnome-panel:
assignee: nobody → pitti

A quick solution might be to move the strings that describe each of the
default applications into a single file. While this isn't ideal (what
about packages from universe?), it would reduce the problem.

On Sun, 2006-05-21 at 21:27 +0000, Sebastien Bacher wrote:
> Thanks for your bug. Is there an easy way to avoid that?
>
> ** Changed in: gnome-panel (Ubuntu)
> Assignee: (unassigned) => Martin Pitt
>

Martin Pitt (pitti) wrote :

@Ben: Upstream does have them in a single file (.desktop). But since this makes it impossible to update translations via language packs, we have added a patch to allow g-p use gettext for translating desktop files.

However, I agree that the memory should be freed after translating the strings. This is not trivial, though. Something to look into for edgy.

Changed in gnome-panel:
status: Unconfirmed → Confirmed
Ben Maurer (bmaurer) wrote :

On Tue, 2006-05-23 at 16:35 +0000, Martin Pitt wrote:
> However, I agree that the memory should be freed after translating the
> strings. This is not trivial, though. Something to look into for edgy.

I'd rather that the strings in a menu be put in one gettext file. This
reduces the amount of disk IO needed.

Hi Ben,

Ben Maurer [2006-05-23 16:51 -0000]:
> On Tue, 2006-05-23 at 16:35 +0000, Martin Pitt wrote:
> > However, I agree that the memory should be freed after translating the
> > strings. This is not trivial, though. Something to look into for edgy.
>
> I'd rather that the strings in a menu be put in one gettext file. This
> reduces the amount of disk IO needed.

Benchmarks have shown that the additional disk i/o is negigible. I
wouldn't like to sacrifice the possibility of updating translations
through language packs for half a second faster startup time. The
memory footprint should be reduced, though.

Martin Pitt (pitti) on 2009-04-16
Changed in gnome-panel (Ubuntu):
status: Confirmed → Triaged
Martin Pitt (pitti) on 2009-09-29
Changed in gnome-panel (Ubuntu):
assignee: Martin Pitt (pitti) → nobody
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers