Log message #4158795

# At Username Text
# Jul 13th 2018, 12:44 admad Practically no benefit for 50 routes.
# Jul 13th 2018, 12:36 josbeir still, thousand connected rotues.. damn
# Jul 13th 2018, 12:35 josbeir oh, thats relevant enough :slightly_smiling_face:
# Jul 13th 2018, 12:33 steinkel benchmarks here > https://github.com/cakephp/cakephp/pull/11765#issuecomment-371139620
# Jul 13th 2018, 12:30 josbeir i'll give that a go, tnx
# Jul 13th 2018, 12:29 steinkel yep
# Jul 13th 2018, 12:29 josbeir :heavy_check_mark:
# Jul 13th 2018, 12:29 josbeir ok, so extend the aws class and implement sleep
# Jul 13th 2018, 12:29 steinkel it's just a way to bypass the exception
# Jul 13th 2018, 12:29 steinkel but you are not actually using that for anything else
# Jul 13th 2018, 12:29 josbeir doh
# Jul 13th 2018, 12:29 josbeir ah right
# Jul 13th 2018, 12:29 steinkel sleep is called on serialization
# Jul 13th 2018, 12:29 josbeir so how does that impact __sleep ?
# Jul 13th 2018, 12:28 josbeir indeed
# Jul 13th 2018, 12:28 steinkel AwsClient throws an exception by default on serialize
# Jul 13th 2018, 12:28 josbeir hmm weird aproach
# Jul 13th 2018, 12:28 steinkel @josbeir I fixed the issue extending the class and overriding `__sleep()`
# Jul 13th 2018, 12:27 steinkel I did some benchmarks
# Jul 13th 2018, 12:24 josbeir +1 for that, i'm guessing performance impact on routes is only relevant if you have many many routes defined
# Jul 13th 2018, 12:23 admad and perhaps have it disabled by default
# Jul 13th 2018, 12:23 admad the comment https://github.com/cakephp/app/blob/master/src/Application.php#L76 should be expanded to mention the potential problems routes caching can cause
# Jul 13th 2018, 12:22 josbeir tnx
# Jul 13th 2018, 12:22 josbeir nah your class works fine tbh, i was just thinking about on how to handle the issue
# Jul 13th 2018, 12:22 steinkel let me check ...
# Jul 13th 2018, 12:22 steinkel actually @josbeir I remember a similar issue
# Jul 13th 2018, 12:22 josbeir it doesn't allow serialization and throws an exception about it
# Jul 13th 2018, 12:22 admad @josbeir if someone wants to make a PR for it sure, currently I am not interested in spending time mitigating problems cause by core defaults :slightly_smiling_face:
# Jul 13th 2018, 12:22 steinkel you'll get benefit if your route processing is slow, or you have many routes
# Jul 13th 2018, 12:21 josbeir its actually a class (amazon aws) that is causing an issue
# Jul 13th 2018, 12:21 steinkel right
# Jul 13th 2018, 12:21 steinkel I mean, if some other middleware serialization is a problem
# Jul 13th 2018, 12:21 josbeir ..or just disable route caching :P
# Jul 13th 2018, 12:21 steinkel that was my first try when dealing with that
# Jul 13th 2018, 12:20 josbeir i'd rather use built in stuff for that
# Jul 13th 2018, 12:20 steinkel you can use the same approach and cache the RouteCollection manually, inside your routes.php file
# Jul 13th 2018, 12:19 josbeir maybe when passing the server stuff as a callable and implement some serializable logic
# Jul 13th 2018, 12:17 josbeir yeah its not an easy thing to fix
# Jul 13th 2018, 12:14 admad we have have numerous tickets about it causing problems when you have unserializable stuff in your middleware. Don't see what i can do in my plugin.
# Jul 13th 2018, 12:13 josbeir its enabled by default in the app skeleton
# Jul 13th 2018, 12:13 josbeir not a fan ?