I was curious these days on why it takes seconds to load the page without cache.

So I use xdebug profiler and qcachegrind to profile performance issue of flarum.

With cache disabled, I find that Less compiler is the performance killer(more than 60% of total time). My suggestion is make a command to compile less and watch less changes but not compile when noticing less been changed when processing requests.

It can enhance extension development experience a lot when setting debug config to true.

And I also profile Flarum with debug to false, so that less is not compiled any more after the first loading. I find that symfony/yaml library cost the most time. So I wonder if the code calling symfony yaml can use php yaml extension in priority.

Flarum loading time in development (with debug mode on constantly) has never been an issue for me.

Debug mode might make it slower, but having it locally means faster responses, so I don't notice much I guess.

Now the production profiling is more interesting. I wonder where/when we're using Yaml though ? The only use case I know of is the optional install configuration that I've never used myself.

    lubobill1990 :facepalm: how did I forget about locales.

    Yeah I'm wondering if locales caching is working at all ? There's a folder for them in storage but I never saw it being filled, even with debug mode off.

    That's one thing that was holding me back with the release of Linguist for beta 8, I'm pretty sure my implementation wouldn't hold if caching was working.

      clarkwinkelmann Yeah I'm wondering if locales caching is working at all ? There's a folder for them in storage but I never saw it being filled, even with debug mode off.

      Right, there does seem to be an issue here. Will look into it.