php-general Digest 1 Jan 2008 18:19:05 -0000 Issue 5211
Topics (messages 266449 through 266450):
Re: PHP5 Speed Issues
266449 by: Arvids Godjuks
Re: About search engine usability
266450 by: Richard Lynch
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hi everyone!
Generaly author of the first e-mail is right. Ofcource, crawling over the
code and getting out of it a few milliseconds off doesn't make it worth, but
you can learn what is good and what is bad and write your code correctly
from the start.
Why not to use
foreach ($data as &$value)
if it's better - faster and takes less memory. That's just a habbit on code
style.
I can bet, that nobody knows or remembers that echo has alternative syntax,
with works faster and is easier to write if you cave to echo a complex
string with many variables and static text, for example
The ordinary:
echo 'Hi! My name is '.$_GET['name'].'. I'm '.$_GET['age'].' and I live in
'.$_GET['country'].'.';
The alternative:
echo 'Hi! My name is', $_GET['name'], '. I'm ', $_GET['age'], ' and I live
in ', $_GET['country'], '.';
I have an aplication with doesn't eat all CPU, just about 50-60%, but it
eats all 3GB of ram. And not because it is poorly written. It serves ~160
000 - 170 000 requests/hour, that's ~3 960 000 hits a day + another 600 000
hits to the application's WEB part. Just one server could handle, but it
can't because of WEB server's FastCGI implementation (they have a patch for
that soon released).
Just ONE Intel E6600 server with Lighttpd and PHP can handle such load if
the code is optimised and written correctly.
--- End Message ---
--- Begin Message ---
On Mon, December 31, 2007 5:19 pm, Jim Webber wrote:
> Hello I'm building a website with a search engine.
> Do you think it is more usable if the search interface had a search
> button? or do you think it will be more convenient to not have button
> to
> let the users just push "enter" to search.
>
> I would appreciate any comment regarding this, thanks.
Have the button, but make it tiny.
There are always some users too new to know that they don't need a
button.
The rest can ignore the tiny bubbles. I mean button. :-v
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
--- End Message ---