Menu

#98 user menu cache

development
closed-accepted
TK Soh
Program (79)
5
2004-03-04
2004-02-05
Uwe Lehnert
No

The patch realizes a "manage / unmanage in stead of
destroy / create" user menu items idea. This patch
improves performance of updating user menus
(i.e. shell, macro, background menu) when
switching between tabbed documents of different
language modes.

Main idea is not to destroy any user menu item
widget as long as they are *not* changed via
"Preference->Default Settings->Customize Menu..".

Reason: destroy / create of widgets consumes
a lot of time.

In stead of destroying / creating of that menu item
widgets they are simply unmanaged / managed
(that's much faster).

For more details have a look into "FEATURE.txt"
file (available in attached tarball). Some
hints to apply this patch can be found in
"README.txt" (available in tarball, too).

This patch was made against
"nedit-latest-sources-HEAD.tar.gz"
source tar ball of 04-Feb-2004
(available at http://nedit.sourceforge.net/snapshot/\).

This patch runs since some days within following
configuration:

Built on: Solaris, Sparc, GNU C
With Motif: 1.2.6 [@(#)OSF/Motif Version 1.2.6]
Running Motif: 1.2 [@(#)OSF/Motif Version 1.2.6]
Server: Sun Microsystems, Inc. 6410

and

Built on: Linux, 386, GNU C (Red Hat 9)
With Motif: 2.1.30 [@(#)Motif Version 2.1.30]
Running Motif: 2.1 [unknown]
Server: The XFree86 Project, Inc 40300000

Discussion

<< < 1 2 3 > >> (Page 2 of 3)
  • Uwe Lehnert

    Uwe Lehnert - 2004-02-26

    Logged In: YES
    user_id=794103

    Ok, convinced ;-)

    More smart widget management introduced with version 2.1
    of the patch: not all widgets of an user menu are
    unmanaged first anymore but only the "delta" of widgets
    to be managed / unmanaged between two language modes
    is now managed / unmanaged. So most of the menu widgets
    aren't touched when documents of different language
    modes are switched.

    Tear off sub menus are only dismissed, if they are not
    shared with the new chosen language mode (as proposed
    by TK).

    Details can be found inside the tar ball
    (file FEATURE.txt).

    The patch was made against
    "nedit-latest-sources-HEAD.tar.gz"
    source tar ball of 26-Feb-2004
    (available at http://nedit.sourceforge.net/snapshot/\).

     
  • Uwe Lehnert

    Uwe Lehnert - 2004-02-26

    user menu cache patch V 2.1

     
  • Tony Balinski

    Tony Balinski - 2004-02-27

    Logged In: YES
    user_id=618141

    I've been using Uwe's patch for some time now, on Solaris,
    and find it really useful. Tab switching is almost
    immediate, and window creation also seems faster (although I
    have no numbers to give you on that one!).

    I use tear-offs quite a lot, almost like those floating
    toolbars the windows apps often give you. Good support for
    those does help a lot. I wonder if there's any way to
    redisplay torn-off menus which were made to disappear when
    switching from one tab to another? That would be an extra
    boon (but don't let that hold up integration of this patch).

    I'm looking forward to seeing this committed!

     
  • Uwe Lehnert

    Uwe Lehnert - 2004-03-02

    Logged In: YES
    user_id=794103

    Version 2.2 of the user menu cache patch
    integrates TK Soh's "redisplay torn-off sub-menus
    which were dismissed after language mode switch"
    solution (as requested by Tony Balinski).

    Also the shrink-expand bug of torn-off sub-menus
    is fixed. A "maximum allowed sub-menu depth"
    validation is added, too. Note: user menu
    cache patch limits nesting level of sub-menus
    to 5 (can be adjusted via modification of
    MAX_SUB_MENU_DEPTH). More comments were added
    to several source files to explain implementation
    of user menu cache feature in more details.

    As usual details can be found inside the tar ball
    (file FEATURE.txt).

    The patch was made against
    "nedit-latest-sources-HEAD.tar.gz"
    source tar ball of 02-March-2004
    (available at http://nedit.sourceforge.net/snapshot/\).

     
  • Uwe Lehnert

    Uwe Lehnert - 2004-03-02

    user menu cache patch V 2.2

     
  • TK Soh

    TK Soh - 2004-03-03

    Logged In: YES
    user_id=411637

    I haven't looked at the details, but is MAX_SUB_MENU_DEPTH
    necessary? Personally I never like the compile-time limits
    except those meant to minimize memory usage, since they can
    potentially serve as hidden problems.

     
  • Uwe Lehnert

    Uwe Lehnert - 2004-03-03

    Logged In: YES
    user_id=794103

    MAX_SUB_MENU_DEPTH can be avoided, of course (like
    almost all of that limits existing inside NEdit). To avoid it
    some more memory management needs to be implemented.
    Let's try ..

     
  • Uwe Lehnert

    Uwe Lehnert - 2004-03-03

    user menu cache patch V 2.3

     
  • Uwe Lehnert

    Uwe Lehnert - 2004-03-03

    Logged In: YES
    user_id=794103

    Version 2.3 of the patch delivered:
    MAX_SUB_MENU_DEPTH (sub-menu depth restriction)
    removed (as requested by TK Soh).

    As usual details can be found inside the tar ball
    (file FEATURE.txt).

    The patch was made against
    "nedit-latest-sources-HEAD.tar.gz"
    source tar ball of 03-March-2004
    (available at http://nedit.sourceforge.net/snapshot/\).

     
  • Eddy De Greef

    Eddy De Greef - 2004-03-04
    • assigned_to: nobody --> tksoh
    • status: open --> closed-accepted
     
<< < 1 2 3 > >> (Page 2 of 3)

Log in to post a comment.