[DGD] String sharing
Felix A. Croes
felix at dworkin.nl
Wed Nov 4 20:33:53 CET 1998
> Random thought on efficiency I just had even though the impact would
> probably be minimal.
>
> What would be the cost involved in having an object that redirects all
> calls relating to description and other similar generic calls to a large
> database daemon that stores generic info? Would this cut down on memory
> and increase on processor use? (which is what I'm aiming for, processor
> seems to be vastly underused in LP muds with the exception of staff doing
> an infinite loop)
Hard to answer that until you compile some statistics about the impact
of inter-object string sharing on your particular mud.
Considerations:
- strings are shared within objects. Constructed strings (i.e. with
addition or taking a substring) are not shared with identical strings
created in a different manner until the object is swapped out.
- putting many shared strings in a single object creates a huge object
that would have to be in memory all the time, quite possibly
<increasing> memory use though decreasing swap file size.
Regards,
Dworkin
More information about the DGD
mailing list