[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  Lambdamoo efficiency question wrt constants
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Lambdamoo efficiency question wrt constants

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Inge Jones   (3 posts)  [Biography] bio
Date Fri 25 Sep 2009 07:03 AM (UTC)  quote  ]
Message
I am planning a game where there will be many non-customisable child instances of each class of object or player, each one bearing many long strings. Constants, in practice.

The natural thing to do is use Lambdamoo's inbuilt inheritance system, but I am worried that will waste loads of memory as each player and object will carry its own full copy of these strings, which are not intended to be individually updatable anyway, whilst I would wish them to all be updated any time I changed the settings in the parent.

I was therefore thinking of setting up a constants repository object which is not a parent of any of these objects, and referring sideways to it as needed.

Can anyone tell me whether I am right in my assumption that child objects keep a complete copy of their inherited property values, with all the memory implications that has? Also does anyone know whether by using a seperate constants repository item, rather than objects being completely self-referencing, there will be a significant slowing in response times (ie increase in processing demands)?
[Go to top] top

Posted by Coderunner   USA  (27 posts)  [Biography] bio
Date Reply #1 on Fri 25 Sep 2009 08:41 AM (UTC)  quote  ]
Message
Hello,

I'm pretty sure that unless a property that has been inherited by a child object has been changed on said child object, that the MOO simply checks the value of the property on the parent object.

HTH,
Jason.
[Go to top] top

Posted by Inge Jones   (3 posts)  [Biography] bio
Date Reply #2 on Fri 25 Sep 2009 08:45 AM (UTC)  quote  ]
Message
Thanks very much, Jason, that will certainly make life easier :)
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,404 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]