Hi!
I'm currently programming some kind of tree-structure to place objects in (think file system). The functions I used for traveling and displaying the tree were all written QuicknDirty, so just mysql queries and result variables.
now in an attempt to make everything cleaner and more clear I switched them to use objects derived from classes for each object.
imagine:
version 1:
$obj = mysql_query("GET ME THE OBJECT");
print $obj["name"]; ... etc
version 2:
$obj = new treeobject($id);
print $obj->name; ... etc
now to my disappointment the object oriented approach is much much much slower that the plain straigth forward approach. But I really would like to use objects.
Is there anything special to take into account when using objects, or is php4 just very slow when creating many objects ? I even tried just using one object and updating that with each pass of the while loop.
any suggestions are greatly appreciated !
mats99
have more fun!