Welcome Guest, Not a member yet? Register   Sign In
Benchmarking Ci4 router
#6

(09-12-2019, 10:07 AM)tony.a Wrote: symfony version 4.3 -4.4
France has  36,681 communes, 101 departments, 26 regions.
I have a classified website where city name is the lroute
Altorouter has the best results and lowest memory usage. Same 35 000 routes  for all.Altorouter with some optimizations  can match 1.350.000 /second
Ill put the tests on github

Each commune doesn't have its own controller/method does it?

Not sure how your site is structured, but I would handle it with routes something like:

PHP Code:
$routes->get('communes/{id}''CommuneController@details/$1');
$routes->get('departments/{id}''DepartmentController@details/$1');
$routes->get('regions/{id}''RegionController@details/$1'); 

I imagine the URL structure is more involved than that. But even so it would be maybe a dozen routes to handle 1 page per.

If you do actually have 35,000 routes in your files, what benefit do you see from that? Very curious.
Reply


Messages In This Thread
Benchmarking Ci4 router - by tony.a - 09-11-2019, 03:22 PM
RE: Benchmarking Ci4 router - by tony.a - 09-12-2019, 01:36 AM
RE: Benchmarking Ci4 router - by kilishan - 09-12-2019, 06:28 AM
RE: Benchmarking Ci4 router - by albertleao - 09-12-2019, 08:21 AM
RE: Benchmarking Ci4 router - by tony.a - 09-12-2019, 10:07 AM
RE: Benchmarking Ci4 router - by kilishan - 09-12-2019, 10:17 AM
RE: Benchmarking Ci4 router - by tony.a - 09-12-2019, 10:22 AM
RE: Benchmarking Ci4 router - by kilishan - 09-12-2019, 10:29 AM
RE: Benchmarking Ci4 router - by tony.a - 09-12-2019, 12:02 PM
RE: Benchmarking Ci4 router - by kilishan - 09-12-2019, 12:47 PM
RE: Benchmarking Ci4 router - by tony.a - 09-12-2019, 11:47 PM
RE: Benchmarking Ci4 router - by tony.a - 09-13-2019, 01:39 AM
RE: Benchmarking Ci4 router - by chris.m - 08-06-2020, 05:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB