We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33974
    • 156 Posts
    Hi all,

    I have a website with several snippet calls etc.
    But performance is very bad although I call almost all snippets cached. I also tried Executioner which outputs me snippet calls times about 0.01 to 0.25secs except Wayfinder which executes in 1.7secs (seems to be a Wayfinder problem).

    But page execution (resource, not assets etc) is at 8secs calling cached.
    Setup is: MODX 2.2-rc2-dev (latest nightly from today).

    You can see site here: http://oedhof.kunden.novolo.de/

    Error log doesn't output any errors. If I set to error level 4 (notice), I get about 250 logs from context-things, phpthumbof problems etc. But none of them are errors.

    Thanks for helping!
    -Anselm
    • Those warnings are still slowing down execution. If you have warnings and notices, you should report/resolve them to at least rule out those issues. Once that is done, we can further diagnose the issues with Wayfinder and whatever else is causing the slow page execution.
        • 33974
        • 156 Posts
        Okay, that's good to know. So I'll list some of them here first:

        I am still getting this error (in latest nightly):
        [2011-12-14 15:02:43] (ERROR @ /manager/index.php) Instantiated a derived class modResource that is not a subclass of the requested class modDocument


        Then after setting error log to '4' I get:

        [2011-12-14 15:15:34] (DEBUG @ /index.php) Language string not found: "Name of a chunk serving as a resource template. NOTE: if not provided, properties are dumped to output for each resource."
        [2011-12-14 15:15:34] (DEBUG @ /index.php) Language string not found: "Name of a chunk serving as resource template for resources with an odd idx value (see idx property)."
        [2011-12-14 15:15:34] (DEBUG @ /index.php) Language string not found: "Name of a chunk serving as resource template for the first resource (see first property)."
        [2011-12-14 15:15:34] (DEBUG @ /index.php) Language string not found: "Name of a chunk serving as resource template for the last resource (see last property)."
        [2011-12-14 15:15:34] (DEBUG @ /index.php) Language string not found: "A field name to sort by or JSON object of field names and sortdir for each field, e.g. {"publishedon":"ASC","createdon":"DESC"}. Defaults to publishedon."
        [ed. note: smooth-graphics last edited this post 12 years, 4 months ago.]
          • 33974
          • 156 Posts
          Seems like I've posted to much lines of code at once. Okay, here's second error output:

          [2011-12-14 15:27:31] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 1234) E_STRICT information: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:32] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 2845) E_STRICT information: Non-static method phpthumb_functions::ImageCreateFunction() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:32] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.functions.php : 363) E_STRICT information: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:32] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 3844) E_STRICT information: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:32] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 2675) E_STRICT information: Non-static method phpthumb_functions::gd_version() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:32] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 658) E_STRICT information: Non-static method phpthumb_functions::GetAllFilesInSubfolders() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:32] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 893) E_STRICT information: Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:33] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 658) E_STRICT information: Non-static method phpthumb_functions::GetAllFilesInSubfolders() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:33] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 893) E_STRICT information: Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:33] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 900) E_STRICT information: Non-static method phpthumb_functions::CaseInsensitiveInArray() should not be called statically, assuming $this from incompatible context
          [2011-12-14 15:27:33] (INFO @ /var/www/vhosts/novolo.de/oedhof/core/model/phpthumb/phpthumb.class.php : 1217) E_STRICT information: Non-static 


          This is about 100 lines of errorlog. [ed. note: smooth-graphics last edited this post 12 years, 4 months ago.]
          • Try using 3 as the log_level. We don't need the debug stuff (unless those lexicon warnings are a concern), but any WARN or INFO messages could be important.

            The first error you listed can be resolved by changing any Resource with class_key = modResource to modDocument.
              • 33974
              • 156 Posts
              Okay, the whole part of my second answer (phpthumb errors) are shown now.
              Not the lexicon notices – but how'd that come? I've upgraded from 2.1.3pl to 2.2-dev. Shouldn't this be done while upgrading - or is this done now in upgrading process? Or should I report as bug?
                • 33974
                • 156 Posts
                Sorry to push that but is there something I can do to omit these errors with phpthumbof?
                • Quote from: smooth-graphics at Dec 15, 2011, 08:44 AM
                  Sorry to push that but is there something I can do to omit these errors with phpthumbof?
                  Don't use it? IDK, tbh the phpthumb code is a pile of crap from my perspective. I would look into other solutions for front-end use to avoid all those E_STRICT errors being triggered. Even if not reported they can affect performance, and I'm sure there are better solutions that phpthumb now for generating thumbnails in PHP 5. I've never been a fan of on the fly thumbnail generation anyway. IMO, there is no reason to burden your visitors to avoid a single step of generating a proper thumbnail version of an image when saving content.
                    • 33974
                    • 156 Posts
                    Oh okay. So what solutions are there for MODX revolution you can recommend? I'm not a programmer wink
                      • 33974
                      • 156 Posts
                      Forget about it. It's not phpthumb which is the major slow down but Wayfinder who sometimes blocks page execution up to 30secs!!!

                      My call:

                      [[Wayfinder? &startId=`0` &rowTpl=`wayfinder_rowTpl` &innerTpl=`wayfinder_inner` &innerRowTpl=`wayfinder_innerRowImg`]]


                      wayfinder_rowTpl:
                      <li class="[[!getTVValue? &tv=`4` &id=`[[+wf.docid]]`]]" [[+wf.classes]]>
                      	<a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>
                      	[[+wf.wrapper]]
                      </li>

                      getTVValue.snippet only because there's a problem with tv parsing in wayfinder:
                      $id = $modx->getOption('id',$scriptProperties,$modx->resource->get('id'));
                      $tvid = $modx->getOption('tv',$scriptProperties);
                      $tv = $modx->getObject('modTemplateVar',$tvid);
                      if(!empty($tv))
                      {
                      	$tvValue = $tv->getValue($id);
                      	return $tvValue;
                      }


                      wayfinder_inner:
                      <ul class="row">
                          [[+wf.wrapper]]
                      </ul>


                      wayfinder_innerRowImg:
                      <li title="" class="col2 subnav-item" [[+wf.classes]]>
                      	<a href="[[+wf.link]]">
                      		<img src="[[getTVValue? &tv=`2` &id=`[[+wf.docid]]`]]" alt="Navigationspunkt [[+wf.linktext]]" title="[[+wf.linktext]]" width="125" height="100">
                      		<h1>[[+wf.linktext]]</h1>	
                      	</a>
                      </li>


                      Any ideas?