getgrav / grav-plugin-admin

Grav Admin Plugin
http://getgrav.org
MIT License
355 stars 227 forks source link

Grav 1.7 RC.16 Unexpected slowness in Admin UI #1945

Closed paulhibbitts closed 3 years ago

paulhibbitts commented 4 years ago

I decided to take the plunge and upgrade my production course site with RC 1.7RC 16. Much to my surprise the Admin Panel navigation seems slower, but the Page Panel in particular which can now take over 15 seconds to load with only ~680 pages:

2020-09-07_11-36-34 (1)

Running on a pretty average server, with PHP Version 7.3.5.

Is there anything perhaps on my end of things which is configured incorrectly?

Not sure if it is related, but seeing this in the Console:

2020-09-07_11-48-59

Here is the site: https://opencoursehub.cs.sfu.ca/paulh/cmpt-363/

Thanks very much! Paul ps - running the same site using MAMP on the Mac I do not see the big hit re: Pages panel loading but the same Console messages

rhukster commented 4 years ago

Is admin caching turned on?

paulhibbitts commented 4 years ago

Thanks very much @rhukster , it was not but turning it on seems to have no effect esp: Pages panel.

mahagr commented 4 years ago

There is a way to get detailed information on what takes all the time in your site.

1) Enable debugger and switch to clockwork (should be default) 2) Install clockwork to your browser 3) Look into the performance tab in clockwork to see what is taking all the time

And if you are able:

4) If you're able, install and enable this module to your PHP: https://github.com/tideways/php-xhprof-extension 5) Look into the profiler tab in clockwork

PS. I'm in discord atm

paulhibbitts commented 4 years ago

Thanks @mahagr , here is an example:

2020-09-07_12-10-26

I will connect with you on Discord too🙂

mahagr commented 4 years ago

This was an upgrade from Grav 1.6 to Grav 1.7.0-rc.16 with a lot of plugins enabled. Disabling Flex Pages from the Flex Objects plugin fixes the slow page loads. For some reason, the local MAMP installation had no issues, but live site (admin) was super slow.

paulhibbitts commented 4 years ago

Hi @mahagr , sorry for the long delay it took quite a while to get a test Grav setup going on the same university server. This test site is a file-copy of the original upgraded site.

For some reason when I enable Clockwork it results in bringing down the site, so for now I've only got the standard debugger.

Here is a sample from within the Admin (Flex pages enabled):

2020-09-12_10-10-17

And here is a sample when viewing pages (Flex pages enabled):

2020-09-12_10-10-37

Front-end flex pages take longer than regular when viewing, for example 1.3sec -> 2.4sec.

I've also disabled all non-Trilby/Grav plugins and no change:

2020-09-12_10-11-07

You can see the site live at: https://opencoursehub.cs.sfu.ca/paulh/cmpt-363-2020/203/home

Connect me again via Discord for access etc.

Thanks very much, Paul

acondura commented 3 years ago

The slowness I get in Admin UI is that it tries to constantly request admin.min.js file. Please see the following screenshot. I started to get this after upgrading from 1.7 rc16 to rc17.

admin-slow

rhukster commented 3 years ago

The original issue was sorted.

@acondura your issue is different and looks like a server configuration issue with JS ajax queries failing. If you continue to have this problem please open a new issue.

acondura commented 3 years ago

Yes, I got the sense this was so after I posted my reply. Thank you!

On Sat, Oct 17, 2020, 21:37 Andy Miller notifications@github.com wrote:

The original issue was sorted.

@acondura https://github.com/acondura your issue is different and looks like a server configuration issue with JS ajax queries failing. If you continue to have this problem please open a new issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/getgrav/grav-plugin-admin/issues/1945#issuecomment-711062688, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM5ZKSIO7BMRFFRDV5SNI3SLHQAFANCNFSM4Q6XVGIA .

paulhibbitts commented 3 years ago

UPDATE: After getting a test area setup on that same server, and manually updating to the latest RC 17 etc (do not have CLI access etc.) the Admin Pages tab now renders as expected (not massively slow) with Flex Objects front-end disabled, but once Flex Objects front-end rendering is ENABLED the slowness returns in the Admin Panel Pages tab.

rhukster commented 3 years ago

We actually have decided to hide the 'frontend flex' option in 1.7. It's just not ready for prime time, it's not performance-optimized nor has it been thoroughly tested. The best solution is currently to use regular pages in frontend but flex-pages in the backend. This is the default setup for Grav 1.7 anyway.

paulhibbitts commented 3 years ago

Thanks @rhukster , Matias has mentioned that too and it sounds fine to me at this point!