Menu

#189 MemoServ's memo id's

open
nobody
None
5
2003-09-12
2003-09-12
No

Could we implement a static ID system for all memos?
Right now, if i have two memos, the first is assigned an
ID of "0" and the second is assigned an ID of "1". As
soon as i delete the first memo, the second memo which
previously had an ID of "1" would have a reassigned ID
value of "0".

I feel that a static ID system would be beneficial since
users would have more flexibility over keeping/deleting
their memos, and being able to read a memo just by
knowing it's ID.

Discussion

  • Joe Hansche

    Joe Hansche - 2003-10-14

    Logged In: YES
    user_id=258370

    not with the current implementation of it, since the memos
    are stored in a list (array), and accessed by their index.
    when a memo is delete, it is removed from the list, and the
    list is reallocated to reflect the new size. If you didn't
    free the memory of a deleted memo, then srvx's memory usage
    would expand as more and more memos are sent and deleted.
    And if you try adding a new key to the memo with an ID, then
    it would make searching, validating, deleting, and reading
    memos take more time, because you would have to iterate over
    the entire list of memos, checking the ID of each one, to
    see if it matches (granted that's how a lot of other
    functions in srvx are implemented).

    Another problem is, exactly how large of an ID range are you
    thinking of? =) If you don't reuse old IDs, then that
    number would grow constantly. Even HelpServ's request IDs
    get very large, but reset every week. I think from a
    programming standpoint, it is most efficien the way it is
    now, and I'm not so sure that enough people find the
    re-numbering of IDs as annoying :\

     
  • Colin Thorpe

    Colin Thorpe - 2004-11-27

    Logged In: YES
    user_id=701746

    -- maybe make this a config option as some networks may not
    like this, as draw backs would be..

    3 memos.. numbered 0 1 2

    you delete memo 1 so you have 0 2 remaining, when you get a
    new memo, would that be numbered 1 or 3?

    if its numbered 3 you could end up with memo id's of 1000+

    Just a thought

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.