I just made a new fresh install of Fuelphp, and the performances are worrying, or at least way more than what i'm used to with Fuel
500 ~ 600 ms for the page to load
65MB ram used
Nothing run on the page : controller method empty, template empty, no views, no sql queries or any operations.
Packages always loaded : Orm, parser, assets, auth (Twig templating used, and so Theme instance is)
In my main controller before function, I detect mobile with Agent::is_mobiledevice(). I thought it could be it, as the cached browscap file is pretty large.
Quite possible, the browscap has expanded quite rapidly over the last period.
Quick fix is to have PHP handle the browscap data, through the php.ini configuration. Agent will automatically use it if available, and no longer create it's own agent cache.
I tried, and the result is not better. The ram consumption is normal, 2.80MB ~, but the page load is the same.
Well I can't use the Agent Class is theses circumstances, that's too bad because it was quite useful.
Edit : If it can help, i found a workaround. The fuel package "special_agent" override Fuel mobile and tablet Agent class detection, using Mobile_Detect librairy. Performances are back, adding barely 0.5ms to pageload.
You're right, it's just a wrapper for the librairy. If you add it, it would be more convenient to have it natively available. Because the current agent class is unusable : Who can afford an extra 700ms in his application pageload for this ?
According to what i read, it's pretty fast too but the class itself just seems to be an optimized cache, but still use browscap and I highly doubt that it's as fast as Mobile_Detect. Bright side is that you could use it to optimize the entiere agent class, and not only mobile detection.