Nette 2.1.2 – page is rendered too long

6 years ago

radas
Member | 213
+
0
-

If I have enabled Debugger on localhost, the page is rendered too long (cca 30 seconds). I compared files generated in temp/cache directory with this files from Nette 2.1.1 and all files are the same. If I have disabled Debugger in bootstrap.php, the page is rendered immediately.

6 years ago

radas
Member | 213
+
0
-

Problem is with Nette\DI\Diagnostics\ContainerPanel:

config.neon:

common:
  nette:
    debugger:
      strictMode: TRUE
      bar:
        - Nette\DI\Diagnostics\ContainerPanel

With this setting is page rendered too long.

6 years ago

Tomáš Votruba
Moderator | 1154
+
0
-

Try container section instead

nette:
    container:
        debugger: true

6 years ago

radas
Member | 213
+
0
-

This is my current setting:

nette:
  container:
    debugger: TRUE

  debugger:
    email: ...
    strictMode: TRUE
    bar:
      - Nette\DI\Diagnostics\ContainerPanel

The page is rendered too log again.

I commented this line

$configurator->enableDebugger(...);

in bootstrap.php. Page is rendered fast, but Nette Debuger bar is not shown.

6 years ago

norbe
Backer | 404
+
0
-

Do you really need container panel everytime? Turn it on only if you need to check if container is generated as you want and then turn it off…

6 years ago

David Grudl
Nette Core | 6877
+
0
-

The only relevat differences between 2.1.1 and 2.1.2 are https://github.com/…6706f7551b3e and https://github.com/…194cd2b7309a. Can you check what slows rendering down?

6 years ago

radas
Member | 213
+
0
-

Problem is in method Strings::fixEncoding().

My PHP version is 5.3.22. When I replaced file Nette\Utils\Strings.php with same from Nette 2.1.1, everything is OK and page is rendered fast.

6 years ago

David Grudl
Nette Core | 6877
+
0
-

I measured the performance before that commit and didn't notice any slowdown. Are you using Windows or Linux?

6 years ago

radas
Member | 213
+
0
-

Windows (PHP 5.3.22), but I'm using also Linux (PHP 5.5.3), where it is OK.

6 years ago

David Grudl
Nette Core | 6877
+
0
-

Mohl bys prosím vyzkoušet, jak to funguje v PHP 5.4? Klidně s verzí 5.4.0.

6 years ago

radas
Member | 213
+
0
-

Zkoušel jsem na Windows s PHP 5.4.26 a tam se problém neprojevil. Stránka se vyrenderuje okamžitě celá.

6 years ago

radas
Member | 213
+
0
-

Ok, but it still takes a long time. I think the problem is in the condition …&& strcasecmp($encoding, ‘UTF-8’) because it's still used branch “else”.

Isn't “…&& strcasecmp($encoding, ‘UTF-8’) === 0” the right way?

Last edited by radas (2014-03-21 08:03)

6 years ago

David Grudl
Nette Core | 6877
+
0
-

Yes, there should be || instead of &&. Refixed: https://github.com/…c3b9da764208

5 years ago

Ivorius
Member | 112
+
0
-

Mám stejný problém, windows s PHP 5.3.13

5 years ago

David Grudl
Nette Core | 6877
+
0
-

This will be fixed in 2.1.3.