Re: multiple instances of same class = slow

From: Date: Wed, 18 Oct 2000 17:25:07 +0000
Subject: Re: multiple instances of same class = slow
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20934@lists.php.net to get a copy of this message
Hey Marc: > http://dev.gamedb.com/ssps/0/1/00131 > http://dev.gamedb.com/ssps/0/1/00609 Both loaded fast for me. In fact 00609, the one with the related link that you said should be slower, seemed faster because it didn't have graphics. > all i need the second instance for is to retrieve the information in > the tiny "Related Products" link at the side (and all it retrieves is > the id number and name). > ... snip ... > The PHP code says > "If this game has a dependency on another game, then create a second > instance of the MGDBproduct class, and fill it with the id number and > name of that second game". Without looking at your code, it's impossible for me to know why you need a second instance of the class. Is it possible to put a function in the same class that finds related things? That'd be far more efficient than having to create a whole new object. Am I missing something in your implementation? Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

« previous php.general (#20934) next »