Closed joanhey closed 1 year ago
The purpose is to make them work! sub-dir & no .htaccess
fastroute (mentioned in comment) https://github.com/myaaghubi/PHP-Frameworks-Bench/blob/e710ff7e84559d0f5ebdda2d46331059acdb2945/fastroute-1.3/index.php#L23-L28
The same thing for phroute
, for slim 4.x
$app->setBasePath, framework-x
has been removed 748950e383d3d04180f20c106c976c0acdde6c3d
Yes, I know that they need it to work. Also any full framework need it, but they calculate it in each request. They need it to create the links to the app and assets.
I only say that they need to calculate it too.
The link: https://github.com/nikic/FastRoute/issues/110#issuecomment-273760186 show some functions, to make automatic detection, that the rest of frameworks need to do it.
PD: another temporal solution is to add notes, at the end of the table, like did Kenjis
For the second note, we are no longer limited to ab
.
For the first note:
phalcon.so
or ice.so
, or any other additional thing.bash benchmark.sh -c -rapache
so isolated! because I found a couple of frameworks cause stuff slower for others however the benchmarks are not executed in parallel.
-c
https://github.com/myaaghubi/PHP-Frameworks-Bench/blob/e710ff7e84559d0f5ebdda2d46331059acdb2945/base/hello_world.sh#L55-L58
-rapache
https://github.com/myaaghubi/PHP-Frameworks-Bench/blob/e710ff7e84559d0f5ebdda2d46331059acdb2945/base/hello_world.sh#L70-L75
mention if I missed the point.The link: nikic/FastRoute#110 (comment) show some functions, to make automatic detection, that the rest of frameworks need to do it.
Also that function is not included in fastroute so I put that part.
I only show the 2 notes of Kenjis as example. For add to this bench, any note that is relevant.
PD:
The phalcon.so
and ice.so
, you don't need to run it in parallel, if you install any of these extensions, all PHP is ~10% slower. (Almost some years ago)
So in any benchmark, it need to install the extension isolated,.
For add to this bench, any note that is relevant.
Do you mean wiki?
The phalcon.so and ice.so, you don't need to run it in parallel, if you install any of these extensions, all PHP is ~10% slower.
These are extensions -pre-compiled and needed to load first- my point is about the frameworks, different story It actually depends on the hardware, less than 10%
I may put some notes for developers to add their libs in, however, it is generally explained in the video (README.md). But considering the title it is not a good idea to ask them not to hard code. There is an exception here pure-php
, which I made, the point is to have a very simple hello world
(small minimum bootstrap cost) not to have a remarkable lib
I think that will be not exceptions. You need to move it to other dir and still work.
Only calculate it like the rest of frameworks do.
It is working just like other libs, with no diff, the source code is available.
You can't ask me to force other libs/frameworks/routingsystems
to not hard code the URL prefix
but you may ask me to not hard code the URL prefix
for pure-php
unlike others, this is the exception I mentioned, and it is not accepted since the pure-php
is not a competitor, the purpose of it is to show without a lib how fast a hello world
can be
Like say in the README: Used the default configuration
So before hand no framework know the URL, but some microframeworks have hardcoded the prefix for this exact benchmark.
Frameworks with this advantage:
The rest need to calculate the prefix in each request.