I’m working on a script to produce statistics from the PHP FPM access log file. The log has the REQUEST_URI for each request but I want to group requests by route (module/controller/action) not by URI. So I need a way to get the route from the URI in the context of a console command. I have the web
UrlManager component but I’m not sure how to use it.
But this is extremely slow. Processing the log file is more than 50x slower using this than with simple string processing (that doesn’t accomplish everything I need). It took 15 minutes to process a log file with 250k lines.
Can you suggest a faster way to do this?