After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 565790 - Tomboy uses too much memory at startup
Tomboy uses too much memory at startup
Status: RESOLVED NOTGNOME
Product: tomboy
Classification: Applications
Component: General
0.13.x
Other Linux
: Normal major
: 1.4.0
Assigned To: Tomboy Maintainers
Tomboy Maintainers
gnome[moved-to-github]
: 619797 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-12-27 16:24 UTC by Sandy Armstrong
Modified: 2017-07-31 12:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sandy Armstrong 2008-12-27 16:24:14 UTC
Tomboy does a lot of unnecessary work at startup that consumes memory unnecessarily and hurts performance.

The major hits are clearly happening in loading notes and their add-ins, as Tomboy SVN only consumes 9MB on startup if there are no notes.

Here are some measurements (195 notes totaling 988K in ~/.tomboy):

Version    Launch    Activate Menu    Open & Edit Note    Open Search
0.12.2     16.2      17               20                  21
SVN        15.8                                           20.5
SVN [1]    10.3      11.8             12.3                13.5
SVN [2]    12        12.6             14.6                16.3
SVN [3]    12.7      13.2             15.3                16.7


[1] Comment-out note add-in loading (includes internal "watchers")
[2] Disabled all add-ins that could be disabled in UI (does not include "watchers")
[3] Upcoming fixes applied (all add-ins enabled)

The last row represents some easy fixes I am going to commit soon (25% memory savings is not bad!).  Basically, I moved a lot of work around in note add-ins, delaying it until each note is opened, instead of during initialization at Tomboy start-up.  For example, there is no reason to instantiate 200 Export To HTML menu items when I have no notes open at start-up.
Comment 1 Sandy Armstrong 2008-12-27 16:38:23 UTC
I also took some additional measurements, though not very scientifically...I inserted Console.ReadLines at several key locations during Tomboy start-up, and took measurements.  Here's what I saw:

1.9 (after init'ing Catalog)
4.3 (after init'ing GnomeApplication, prefs mgr, ActionManager)
5.6 (after init'ing AddinManager)
8.6 (after instantiating all Note objects)
12.5 (after loading all note add-ins)
13.0 (after init'ing SyncManager)
13.6 (after registering with dbus)
13.7 (after loading all applications add-ins)
13.9 (after tray icon starts and Tomboy is completely started)

So we're looking at about:
1.9MB for starting a typical Mono app
2.5MB for starting a typical GNOME app
1.3MB for using Mono.Addins
3.0MB loading 195 notes totaling 988KB in ~/.tomboy
4.0MB loading add-ins for those notes
0.5MB loading all sync add-ins
0.6MB registering D-BUS
Comment 2 Sandy Armstrong 2008-12-27 17:23:45 UTC
Committed current work in r2268.
Comment 3 Sandy Armstrong 2008-12-27 17:24:51 UTC
By the way, my goal before I close this bug is to get Tomboy startup under 10 MB (195 notes, no notes opened).
Comment 4 Andreas Proschofsky 2009-01-17 12:43:53 UTC
Just some information from my setup in regards to this as I'm using quite a bit more notes than you do, 621 to be precise. All measuring done with Tomboy 0.13.2

Startup memory with default addins: 33.9 MB

If I disable all add-ins I get quite a chunk of memory back: 23.0 MB

Actually I tracked this down to 3 add-ins. When disabling only Backlinks, Export to HTML and Printing I get: 23.1 MB, so not too much difference anymore

The worst offender seems to be Backlinks. When disabling all plugins but Backlinks I get: 28,0 MB
The same for Export to HTML: 26.5 MB
Printing: 26.7 MB

Btw, those three also add massively to my startup time (~25 percent), but that's handled in bug #567989
Comment 5 Sandy Armstrong 2009-01-17 15:32:26 UTC
(In reply to comment #4)
> Just some information from my setup in regards to this as I'm using quite a bit
> more notes than you do, 621 to be precise. All measuring done with Tomboy
> 0.13.2

Thank you for your numbers.  Just to be clear, the improvements I have committed to SVN have not yet been part of a Tomboy release.  If you can retest with SVN (or 0.13.3 when it is released Monday), that would be very informative.  Thanks!
Comment 6 Sandy Armstrong 2009-01-17 16:04:09 UTC
By the way, suka, the add-ins you mentioned had some of the biggest memory improvements.  They were doing a *lot* of unnecessary and premature work.
Comment 7 Andreas Proschofsky 2009-01-17 21:48:24 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Just some information from my setup in regards to this as I'm using quite a bit
> > more notes than you do, 621 to be precise. All measuring done with Tomboy
> > 0.13.2
> 
> Thank you for your numbers.  Just to be clear, the improvements I have
> committed to SVN have not yet been part of a Tomboy release.  If you can retest
> with SVN (or 0.13.3 when it is released Monday), that would be very
> informative.  Thanks!
> 

Did that, looks like some good improvements:

Startup without plugins: 21.8 MB
Startup with all the once problematic plugins: 22,2 MB

So basically no difference here anymore (and lower than before). Though in relation to your numbers it can still be seen that keeping all the notes in RAM has a severe penalty with lots of notes, imagine users with thousands of notes...
Comment 8 Sandy Armstrong 2010-05-27 13:55:58 UTC
*** Bug 619797 has been marked as a duplicate of this bug. ***
Comment 9 André Klapper 2017-07-31 12:40:41 UTC
The Tomboy team has moved from GNOME Bugzilla to GitHub for bug reports and feature requests: 
      https://github.com/tomboy-notes/tomboy/issues/
Closing this report as NOTGNOME as part of Bugzilla Housekeeping (bug 781054) to keep tasks in one place. Please feel free to transfer this task to GitHub if this task is still valid in a recent Tomboy version. 
We are sorry for the inconvenience.