Date: 05/31/01
- Next message: James Johnson: "Re: [phplib] PHP and recursion"
- Previous message: Gerald Howse: "[phplib] Re: Creation of GIF image buttons in PHP - plus URLENCODE Links in array"
- Next in thread: James Johnson: "Re: [phplib] PHP and recursion"
- Reply: James Johnson: "Re: [phplib] PHP and recursion"
- Reply: Maxim Derkachev: "Re: [phplib] PHP and recursion"
- Maybe reply: D. Sebastien Taggart: "FW: [phplib] PHP and recursion"
- Maybe reply: Klaus Seidenfaden: "Re: [phplib] PHP and recursion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hola.
My question is not related to PHPLib specifically, for which I apologize. But
the members of the list have oft displayed good knowledge of the underworkings
in PHP and I'd like to get some insight into something I've run into recently.
I recently built a pair of classes whose purpose is to create a tree of TreeNode
objects in which each node has one parent, many children and an array of
arbitrary data. Performing operations on these trees uses a lot of recursion, of
course. Upon testing one function that traverses the tree, creating an array of
path illustration strings through the tree (i.e. $paths[0] ==
"root:node1:node2", $paths[1] == "root:node1:node4:node7"), PHP quit while
complaigning about using too much memory. My script was using a whopping 8 megs!
I examined my code to see if I was doing something stupid to fill up the RAM and
didn't find anything (which, of course, doesn't mean it isn't there. :) But I
wanted to get some more info on how PHP deals with recursion and whether or not
people have any comments/caveats to express on the issue. I've been spoiled by
Scheme and find that recursion is wonderful at times. I'd like to know if it's
really a good idea to use it that much in PHP.
Thanks in advance!
Regards,
Roy Huggins
roy <email protected>
http://www.royhuggins.com/employability
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: James Johnson: "Re: [phplib] PHP and recursion"
- Previous message: Gerald Howse: "[phplib] Re: Creation of GIF image buttons in PHP - plus URLENCODE Links in array"
- Next in thread: James Johnson: "Re: [phplib] PHP and recursion"
- Reply: James Johnson: "Re: [phplib] PHP and recursion"
- Reply: Maxim Derkachev: "Re: [phplib] PHP and recursion"
- Maybe reply: D. Sebastien Taggart: "FW: [phplib] PHP and recursion"
- Maybe reply: Klaus Seidenfaden: "Re: [phplib] PHP and recursion"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

