Page 3 of 3
Re: Livecode Server performance
Posted: Thu Apr 29, 2021 6:00 pm
by AxWald
Hi,
Ooops, didn't explain it clearly enough - I only used the "$_SERVER['REMOTE_ADDR']" this time. So the results basically show what's the cost for a very simple CGI call, over the different versions & tools.
Have fun!
Re: Livecode Server performance
Posted: Thu Apr 29, 2021 6:09 pm
by FourthWorld
What is the complete script?
Re: Livecode Server performance
Posted: Fri Apr 30, 2021 1:34 pm
by AxWald
Hi,
FourthWorld wrote: ↑Thu Apr 29, 2021 6:09 pm
What is the complete script?
I used "
put $_SERVER["REMOTE_ADDR"]" (LC) resp. "
echo $_SERVER['REMOTE_ADDR'];" (PHP) for my test.
FourthWorld wrote: ↑Thu Apr 29, 2021 4:54 pm
[...] it may be helpful to run the test I noted above in the IDE to get a better feel for what that particular test is - and isn't - showing us.
You mean this one?
Code: Select all
put 0 into myVar
repeat for 100 times
add 1 to myVar
put myVar
end repeat
Looking closer, this test doesn't make sense. It would just flood stdOut with a hundred lines, right? Maybe this is what confuses loader.io?
I translated it to:
Code: Select all
<?lc
put 0 into myVar
repeat 100
add 1 to myVar
end repeat
put myVar
?>
<?php
$myVar=0;
while($myVar < 100) {
$myVar ++;
}
echo $myVar;
?>
Tested with my improved tool (see below!) I got these results:
Code: Select all
Web site tiny: 49.8 ms 1/ a
addUp PHP 7.2: 50.7 ms 3/ 100
Web site: 50.9 ms 1666/ <!DOCTYPE [...]
addUp PHP 8: 51 ms 3/ 100
addUp LC 8.2: 79.4 ms 3/ 100
addUp LC 8.0: 89.4 ms 3/ 100
Explanation: "
addUp" are the scripts above. "
Web site" are two .html's fetched. 3rd row shows "
[Size of result]/ line 1 of [result]" - the real HTML doc is trunctated here. The times are for 1 call (averaged).
Interesting:
- This is something where PHP 7.2 is fast - usually it's considerable slower compared to PHP 8!
- The PHP's & the web sites are always very close, so PHP seems to have nearly zero overhead.
- The LC servers always are min. ~30ms slower. (Only 'revdb.so' & 'dbmysql.so', anything else is removed).
Ah, and there's a new version of my tester tool:
- It now performs an additional (invisible) test on the local HD, reading a tiny file. To compensate for any slow hardware/ LC versions this time is subtracted from each of the other results. If this happens, the result contains a notice. My LC 6.7.10 does it reliable in ways below 1 ms, so I never get the msg :)
- It now allows any results - it drops all but line 1 & removes any quotes from it. So you can fetch complete web sites or more complex results. This caused a crash before.
- It now shows the (real) size of the scripts results, before the actual result.
Have fun!
Re: Livecode Server performance
Posted: Fri Apr 30, 2021 4:00 pm
by FourthWorld
I'll share my php notes later when I'm at my desk.
So far in your shared host tests we see a difference of 0.03 seconds - measurable but not noticeable.
Have you done any comparisons with Ruby or Python?
Re: Livecode Server performance
Posted: Fri Apr 30, 2021 4:07 pm
by FourthWorld
Rereading your post, that test was done on localhost, not a shared server?
Is php being run via CGI, FastCGI, or Apache Module?
Re: Livecode Server performance
Posted: Fri Apr 30, 2021 8:54 pm
by AxWald
Hi,
all tests was done on the same shared server @ All-Inkl.com. My own local Ubuntu server has been retired - getting CGI to work in my available time was too difficult a task. Seems if you read 3 specific Linux how-to's you learn 4 different "solutions", and quite often none of it applies ;-)
As far as I know, my PHP runs as "CGI/FPM" - whatever this is. Is there a way to find out via SSH?
And no, no tests with Ruby or Python. I'd not even know how to do it ;-)
Have fun!