Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Child objects querying parent objects about themselves

by jdporter (Chancellor)
on Nov 13, 2002 at 17:55 UTC ( #212651=note: print w/replies, xml ) Need Help??


in reply to Child objects querying parent objects about themselves

You are faced with a classic time-vs-space tradeoff.

You can either:

  • store each child's coordinates in itself (redundant, and possibly risking sync problems);
  • store the children in a hash as well as the arrays in the parent; or
  • do a brute-force look-up of the child each time it wants the info.

jdporter
...porque es dificil estar guapo y blanco.

  • Comment on Re: Child objects querying parent objects about themselves

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://212651]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2022-05-16 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (62 votes). Check out past polls.

    Notices?