QUAL Make API Explorer work under FrankenPHP#38107
QUAL Make API Explorer work under FrankenPHP#38107JonBendtsen wants to merge 4 commits intoDolibarr:developfrom
Conversation
|
Hello John, it seems that Franckenphp is faster than other PHP servers. Have you done any tests in this area? What were the results? |
Yes @defrance I currently doing some tests Running in purely CGI mode, not worker mode of FrankenPHP, my test script states that I get about a 35% speedup with FrankenPHP. All tests are done with HTTPS, though without any Certificate check. |
|
Very interesting. |
sorry @defrance I spoke too fast, the 12x14 speed gain is because FrankenPHP api calls doesn't save any data. after doing some data sanitfy checks, they were empty :-( but 35% aka 1,35 is still good gain |
66e4b25 to
a96527d
Compare
| if (preg_match('#^/api/index\.php(.*)$#', $uri, $matches)) { | ||
| $path_info = $matches[1]; | ||
| } else { | ||
| $path_info = $_SERVER['PATH_INFO'] ?? $_SERVER['ORIG_PATH_INFO'] ?? ''; |
There was a problem hiding this comment.
Can you add parenthesis here so there is no doubt of which test is done first ?
and now I can't even reproduce that :-( |
|
Yesterday I compared php8.2 on debian bookwork with frankenphp on php8.4 on debian trixie - that might also explain some speed difference. Today I am looking at frankenphp on 8.2, but still on debian trixie :-( |
|
I think there might be a small gain ~25% when running dolibarr under FrankenPHP in CGI mode, but it is perhaps better than throughput is that FrankenPHP works better under load. But notice that I mostly checked API performance and not GUI performance.
|
QUAL Make API Explorer work under FrankenPHP
Applying this PR will make the API explorer work when running using FrankenPHP which is explored here Dolibarr/dolibarr-docker#98
Also tested in regular Apache setup for the develop branch and it also worked.