Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 02-05-2008, 11:22 AM   #1
Joel Roller
 
Joel Roller's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default More on windows performance

Hi,

I've compiled the latest php out of CVS and I'm having the same (wacky)
performance trouble that I've had before. I have cygwin on my machine
that I'm currently using 'time' to test php.exe with my ~100k files of
xes.

The Release_TS_inline numbers appear to be only slightly faster than the
Release_TS numbers. The binary windows php-4.0.0 release is faster
still.

Using the command:
time ./php.exe speed-100k-html.php > dump

For my file with just 100,000 xes, I get this time:
0m7.750s real
0m0.031s user
0m0.031s sys

For my file that <? print ?>s 100,000 chars, I get this time:
0m3.016s real
0m0.046s user
0m0.015s sys

And for php3 I get:
0m0.250s real
0m0.031s user
0m0.031s sys


Perhaps one of you can decipher these numbers... It seems to me that
the user+sys time only adds up to over 0.06 seconds. Which I believe
would be the time that something like this SHOULD actually take.
However, the actual elapsed time is odd because: a) its so slow, b) the
print statements are so much faster than raw characters.

If it would help for me to mail anyone the files I am testing, I will...
I would attatch them here, but they are 200k and it is so easy to
recreate such things in vi ('100ixESCyy999pp').

When I compiled from cvs, the only change I made was adding
ext/standard/scanf.[ch] to the project, because a couple files
referenced php_sscanf_internal.

If you can lend any suggestions for what I might do to get this time
down, please, mail 'em off to me.

-joel



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Advertisements
Old 02-05-2008, 11:22 AM   #2
Drew Kime
 
Drew Kime's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PHP-WINDOWS] More on windows performance

> Perhaps one of you can decipher these numbers... It seems to me that
> the user+sys time only adds up to over 0.06 seconds. Which I believe
> would be the time that something like this SHOULD actually take.
> However, the actual elapsed time is odd because: a) its so slow, b) the
> print statements are so much faster than raw characters.


I suspect the speed is due to the server not having to parse through all
those characters. If you have any type of parsing happening on your raw
HTML files -- for SSI, etc. -- the server has to parse through every single
character looking for control codes. With the single print statement in a
loop, it is able to simply execute the command.

I have no figures to back up this supposition, but it has a "common sense"
logic to it. See how long it takes (you, not a computer) to find the string
"<?" in a file of 100,000 random characters, then see how long it takes to
find the same string in the file:
<? while ($i < 100000):
echo("*");
$i++;
endwhile ?>
It parses much faster, then just spits out the characters. Has anyone done
a test of raw HTML output speed with all parsing, including SSI, disabled?

 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 02-05-2008, 11:22 AM   #3
Joel Roller
 
Joel Roller's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default [PHP-WINDOWS] More on windows performance

Aye. I will describe both files again:

1) The 'html' file looks like this:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
..... etc
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

2) The 'print' file looks like this:
<?
print 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
print 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
..... etc
print 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
?>

(Both actually contain 1000 lines of 100 xes.)

File 2 is twice as fast as file 1. Both are no where near as fast as linux.
I have repeated similar observations on 3 other computers. Windows NT 4sp4,
4sp6, 2000. Yet I'm not sure anyone has been able to successfully repeat my
experiment.

Here's some comparisons:
$ time cat speed-100k-html.php > dumpfile
real 0m0.094s
$ time ./php3.exe speed-100k-html.php > dumpfile
real 0m0.235s
$ time ./php4.exe speed-100k-html.php > dumpfile
real 0m6.625s

-joel


Drew Kime wrote:

> > Perhaps one of you can decipher these numbers... It seems to me that
> > the user+sys time only adds up to over 0.06 seconds. Which I believe
> > would be the time that something like this SHOULD actually take.
> > However, the actual elapsed time is odd because: a) its so slow, b) the
> > print statements are so much faster than raw characters.

>
> I suspect the speed is due to the server not having to parse through all
> those characters. If you have any type of parsing happening on your raw
> HTML files -- for SSI, etc. -- the server has to parse through every single
> character looking for control codes. With the single print statement in a
> loop, it is able to simply execute the command.
>
> I have no figures to back up this supposition, but it has a "common sense"
> logic to it. See how long it takes (you, not a computer) to find the string
> "<?" in a file of 100,000 random characters, then see how long it takes to
> find the same string in the file:
> <? while ($i < 100000):
> echo("*");
> $i++;
> endwhile ?>
> It parses much faster, then just spits out the characters. Has anyone done
> a test of raw HTML output speed with all parsing, including SSI, disabled?
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags:




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[PHP4BETA] Wacky Performance Problem w/ Windows Zeev Suraski PHP 0 02-05-2008 11:21 AM
[PHP-WINDOWS] PHP4 extensions on Windows platform huib Bakker PHP 1 02-05-2008 11:20 AM
Performance of ATR0635 and GSC3f eeh GPS 0 06-25-2007 11:05 PM
Windows Media Player 11 under Windows Vista Emmanuel Debrosse Windows 4 05-28-2007 10:29 PM


Featured Websites




All times are GMT +1. The time now is 3:08 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98