Re: [pear-webmaster] new search, some tips

From: Date: Thu, 14 Jul 2005 15:32:09 +0000
Subject: Re: [pear-webmaster] new search, some tips
References: 1 2  Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-4215@lists.php.net to get a copy of this message
On Thu, 14 Jul 2005 17:23:24 +0200 mj@php.net (Martin Jansen) wrote: > > Any objection to do so? Using templates/search_result.html for > > example. > > Please not. I specifically got rid of the stuff in templates/ > for the package search because it was a nightmare to maintain, > and because it was needlessly slow. Well, regarding the amount of files included by default, will not change that much ;-). At least keep the HTML is the search.php page. There is not much HTML, right, but already too much for my taste, it should return the datas only :) (easier to add test cases too). > > A second point is the usage of getAll, it is generally not a > > good idea. As we use the same DB objects everywhere, I fail to > > see why we do not store/returns result objects more often. > > Avoid multiple and useless loops for nothing, and is a bit more > > "memory friendly". > > I don't understand that. Could you give some concrete hints on > what should be changed? No usage of getAll, but query(). getResult will use fetch() and returns a row, exactly as it works now but s/foreach/while/. --Pierre

« previous php.pear.webmaster (#4215) next »