Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUDs
➜ General
➜ Lambdamoo efficiency question wrt constants
Lambdamoo efficiency question wrt constants
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Inge Jones
(3 posts) Bio
|
Date
| Fri 25 Sep 2009 07:03 AM (UTC) |
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)? | Top |
|
Posted by
| Coderunner
USA (27 posts) Bio
|
Date
| Reply #1 on Fri 25 Sep 2009 08:41 AM (UTC) |
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. | Top |
|
Posted by
| Inge Jones
(3 posts) Bio
|
Date
| Reply #2 on Fri 25 Sep 2009 08:45 AM (UTC) |
Message
| Thanks very much, Jason, that will certainly make life easier :) | 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.
12,600 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top