[Prev][Next][Index][Thread]

# Re: [SERVER] LambdaMOO 1.8.x feature wishlist

- Date: Mon, 11 Nov 1996 12:39:19 PST
- From:
- Reply-To:
- In-Reply-To: Your message of "Mon, 11 Nov 96 02:50:56 PST." <Pine.SOL.3.91.961111022315.20588A-100000@laurel>

    Your message dated: Mon, 11 Nov 96 02:50:56 PST
    > (1) Security.
    >
    >      Limit string and list lengths to prevent malicious programmers
    >      (or unfortunate accidents) from bringing down any MOO currently in
    >      existence.

    Yeah, in addition to being able to bring down the MOO accidentally or
    malicously, really long properties can cause killer performance problems.  We
    recently had an intermittent lag problem.  We traced it to a listening device
    that was adding everything it heard to a list, and had grown to almost 5000
    items long.  Whenever anyone was in that room, the whole MOO slowed down.

    Here's the verb I used to find it:

    "Syntax: long_props([max length])";
    "Finds all properties in the db longer than max length.";
    "Max length defaults to 500";
    "This code must be owned by a wizard";
    "Amy Bruckman, asb@media.mit.edu, 11/96";
    if (!caller_perms().wizard)
      return E_PERM;
    endif
    long = args ? arg[1] | 500;
    all = $object_utils:descendents_suspended(#1);
    result = {};
    for item in (all)
      $command_utils:suspend_if_needed(0, item);
      props = $object_utils:all_properties(item);
      for p in (props)
        $command_utils:suspend_if_needed(0, item);
        value = item.(p);
        if (typeof(value) == LIST && (l = length(value)) > long)
          result = {@result, {l, item, p}};
        endif
      endfor
    endfor
    $command_utils:suspend_if_needed(0);
    result = $list_utils:sort_alist_suspended(0, result);
    for item in (result)
      $command_utils:suspend_if_needed(0);
      player:tell($string_utils:nn(item[2]), ".", item[3], ": ", item[1]);
    endfor
    player:tell(length(result), " properties longer than ", long, ".");

    I find it useful to run this once in a while.  A lot of people don't realize
    how evil really long lists are.  (Anyone know how the time required
    for list operations changes with respect to their length?  Pavel told me
    once a long time ago...  I seem to remember that it was worse than order
    n^2).

    By the way, $wiz_utils.missed_help_strings will probably be near the top of
    the list on most MOOs.  I turned off keeping track of missed help strings on
    MediaMOO.  On MOOSE Crossing, I keep thinking I'll go through them, but I
    never do.  Maybe LambdaCore should implement that feature in a more
    efficient way...  (Another project I'll never get around to!)

    -- Amy

    p.s. I'm a clue-cows reader.  Please cc me directly on any replies!

Follow-Ups:

- Re: [SERVER] Secure VM

- From: Michael Brundage <brundage@laurel.ipac.caltech.edu>

References:

- [SERVER] LambdaMOO 1.8.x feature wishlist

- From: Michael Brundage <brundage@laurel.ipac.caltech.edu>

- Prev: [SERVER] LambdaMOO 1.8.x feature wishlist
- Next: Re: [SERVER] LambdaMOO 1.8.x feature wishlist
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index