Nette 2.1.2 – page is rendered too long

Notice: This thread is very old.
radas
Member | 221
+
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.

radas
Member | 221
+
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.

Tomáš Votruba
Moderator | 1114
+
0
-

Try container section instead

nette:
    container:
        debugger: true
radas
Member | 221
+
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.

norbe
Backer | 405
+
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…

David Grudl
Nette Core | 8111
+
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?

radas
Member | 221
+
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.

David Grudl
Nette Core | 8111
+
0
-

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

radas
Member | 221
+
0
-

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

David Grudl
Nette Core | 8111
+
0
-

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

radas
Member | 221
+
0
-

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

radas
Member | 221
+
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)

David Grudl
Nette Core | 8111
+
0
-

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

Ivorius
Nette Blogger | 119
+
0
-

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

David Grudl
Nette Core | 8111
+
0
-

This will be fixed in 2.1.3.