trilbymedia / grav-plugin-flex-objects

Powerful and supremely flexible object support for Grav
MIT License
41 stars 10 forks source link

Slow rendering between version v1.2.0 and v1.3.0 #166

Open Toutenkit opened 2 years ago

Toutenkit commented 2 years ago

After encountering the problem "admin file_get_contents() permission denied" SOLVED >1.7.34 - admin file_get_contents() permission denied error - windows and php 8.18 and below · Issue #2299 · getgrav/grav-plugin-admin · GitHub I upgraded my local server to the latest version of PHP 7.4.[x] & 8.10 and no results so I went back to older versions which work fine

Windows 10 Wampserver 3.1.9 64bit PHP 7.3.9 ( >= 7.4.[x] pas supporté par Wampserveur) Apache 2.4.39

I tried to reproduce the error and found a problem with the Flex Objects plugin I don't know if the problem could be related to the bug "admin file_get_contents() permission denied" (Slow rendering before error)

On fresh installation Tested each in turn and did exactly the same on all three versions

Test 1

Flex Objects v1.2.0

Grav: page rendering v1.7.33 v1.7.34 v1.7.35
/pages/typography Fast (2s) Very long (20s) Very long (20s)
/pages Fast (2s) Very long (20s) Very long (20s)

Slow-rendering-between-version---1

Test 2

Flex Objects v1.3.0

I have disabled the Flex Objects plugin

Grav: page rendering v1.7.33 v1.7.34 v1.7.35
/pages/typography Fast (2s) Fast (2s) Fast (2s)
/pages Fast (2s) Fast (2s) Fast (2s)

Slow-rendering-between-version---2

Test 3

Flex Objects v1.3.0

\config\plugins\flex-objects.yaml Disabled for pages (Admin) directories:     2: 'blueprints://flex-objects/user-accounts.yaml'     3: 'blueprints://flex-objects/user-groups.yaml'

Grav: page rendering v1.7.33 v1.7.34 v1.7.35
/pages/typography Fast (2.8s) Fast (2.9s) Fast (2.7s)
/pages Fast (2s) Fast (2s) Fast (2s)

Slow-rendering-between-version---3

mahagr commented 2 years ago

We have tried to replicate the issue, but we've had no success. The page load is fast with both older and newer versions, there's no meaningful difference between them. With and without cache. How many pages do you have? Have you installed any plugins?

Toutenkit commented 2 years ago

I did the test with a new installation without any modification or addition.


I redid the test by taking the "Network" tab I made a mistake in the position on versions of the Flex Object in the previous post

New installation of Grav without any modification. Grav download from Github. On Chrome I did not check in Network "disable cache". I make a first tour of the backoff by going to save the page "Typography", to make cache Then I visit each page while waiting for another one to be finished

(New installation of Windows 10 on new hard disk)

Problem: Page rendering and page saving are very long with the Flex Objects plugin enabled

If you need a specific test, let me know


LEGEND

ERROR * : Failed to save entry: file_get_contents(): read of 8192 bytes failed with errno=13 Permission denied https://github.com/getgrav/grav-plugin-admin/issues/2299

NOTE

Wampserver 3.2.0

Here is what I did in chronological order

PHP 7.3.9

Grav version v1.7.33 v1.7.34 v1.7.35 v1.7.36
Flex Objects v1.2.0 v1.2.0 v1.3.0 v1.3.0 v1.3.1
1- save : /pages/typography Fast Very long Very long Very long
2 -rendering : /pages/ Fast (2s) Very long (16s) Very long (16s) Very long (16s)
Grav version v1.7.33 v1.7.34 v1.7.35 v1.7.36
Flex Objects v1.2.0 disabled disabled disabled disabled
1 - save : /pages/typography Fast Fast Fast Fast
2 - admin rendering : /pages/ Fast Fast Fast Fast

I am upgrading to PHP 7.4.4

Grav version v1.7.33 v1.7.34 v1.7.35 v1.7.36
Flex Objects v1.2.0 v1.2.0 v1.3.0 v1.3.0 v1.3.1
1 - save : /pages/home Fast ERROR * ERROR * ERROR *
2 - admin rendering : /pages/ Fast Fast Fast Fast

I refresh the pages : Grav >= v1.7.35 (not v1.7.34) : ERROR *

Save : All page ok Grav all : Page Typography save > Fast

Grav version v1.7.33 v1.7.34 v1.7.35 v1.7.36
Flex Objects v1.2.0 v1.2.0 v1.3.0 v1.3.0 v1.3.1
save : /pages/typography2 Fast ERROR * ERROR * ERROR *

Page Typography - page copy > ERROR *

Grav = v1.7.34 : Refresh page > OK Grav >= v1.7.35 : Refresh Refresh Refresh Refresh page > ERROR * Manual removal of cache files Refresh page - Grav >= v1.7.35 : ERROR *

I am upgrading to PHP 7.3.12

Manual removal of cache files

Refresh page Session corruption detected, restarting session...

Grav version v1.7.33 v1.7.34 v1.7.35 v1.7.36
Flex Objects v1.2.0 v1.2.0 v1.3.0 v1.3.0 v1.3.1
1 - save : /pages/typography2 Fast Fast Fast Fast
2 - rendering admin : /pages/ Very long (16s) Very long (16s) Very long (16s) Very long (16s)
Grav version v1.7.33 v1.7.34 v1.7.35 v1.7.36
Flex Objects v1.2.0 disabled disabled disabled disabled
1 - save : /pages/typography2 Fast Fast Fast Fast
2 - rendering admin : /pages/ Fast Fast Fast Fast

I am upgrading to PHP 7.4.4

Manual removal of cache files

Grav version v1.7.33 v1.7.34 v1.7.35 v1.7.36
Flex Objects v1.2.0 disabled disabled disabled disabled
1 - save : /pages/typography2 Fast Fast Fast Fast
2 - rendering admin : /pages/ Fast Fast Fast Fast
3 - save : /pages/typography Fast Fast Fast Fast

Activating Flex Objects - Grav >= v1.7.34 : ERROR * Refresh page > OK

Grav version v1.7.33 v1.7.34 v1.7.35 v1.7.36
Flex Objects v1.2.0 v1.2.0 v1.3.0 v1.3.0 v1.3.1
1 - rendering admin : /pages/ Very long (16s) Very long (16s) Very long (16s) Very long (16s)
2 - rendering admin : /pages/typography2 Fast Fast Fast Fast
3 - save : /pages/typography2 Fast Fast Fast Fast
4 - copy : /pages/typography2 Fast ERROR * ERROR * ERROR *
5 - refresh : /pages/typography2 Fast Fast ERROR * ERROR *
6 - refresh : /pages/typography2 Fast Fast ERROR * ERROR *
7 - refresh : /pages/typography2 Fast Fast ERROR * ERROR *

Manual removal of cache files

Grav version v1.7.33 v1.7.34 v1.7.35 v1.7.36
1 - refresh : /pages/typography2 Fast Fast ERROR * ERROR *
2 - refresh : /pages/typography2 Fast Fast ERROR * ERROR *
3 - cookie : grav-admin-flexpages grav-site-[xxx]-admin grav-admin-flexpages grav-site-[xxx]-admin grav-admin-flexpages grav-site-[xxx] grav-site-[xxx]-admin grav-admin-flexpages grav-site-[xxx] grav-site-[xxx]-admin grav-admin-flexpages

The cookies

Grav v1.7.35

  1. delete cookie > grav-admin-flexpages
  2. Refresh page > ERROR *
  3. delet all cookie
  4. Refresh page > ERROR *
  5. Refresh page > OK

Grav v1.7.36

  1. delete cookie > grav-site-[xxx]-admin
  2. New connection
  3. Dashboard > ok
  4. rendering : /pages/typography2 > long
  5. save : /pages/typography2 > long