-
- 97 Posts
I’m using wayfinder to load a menu that is 4 levels deep and has about 750-1000 items in it. Here is the snippet call:
[[Wayfinder?startId=`0`&level=4]]
This call takes about 10 seconds to process every single page load. I was under the impression that since I’m calling this snippet cached that it would just grab it out of the cache after processing it once.
Anyway, it’s terribly slow and I’d appreciate any advice on how to make this faster. Is this amount of data just to much for Wayfinder/MODx to handle?
I’m running this site on an OS X server (1.4), Apache 1.3, PHP 5.1.2
Thanks,
James
Is this on a public server that we could see a link?
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
If the document is cached and the snippet call is cached, then the whole page will be cached, menu and all.
The reason I ask if there’s a public link because I wanted to see if there’s any other elements that might not be loading. I’ve seen missing favicons or JS files cause a similar behavior. And depending on what’s going on with your Wayfinder template it may be something missing that’s causing a similar behavior.
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
- 97 Posts
As far as UTF-8 vs ISO-8859-1, MODx sets that via PHP and it overrides the meta tag (at least it does in firefox) The Setting is in the Manager Configuration. You probably know this already, but it took me a while to figure out and should be corrected. Thanks for pointing that out and for finding the php output stuff. I’ll look into that.
James
-
- 3,975 Posts
You can also use MODx timing tags for more timing information as well. It might help.
-
- 97 Posts
Ok, I think I need to reformulate my question. I know that the issue lies with the giant menu. When it loads the first time the page takes about 30 seconds to load. The snippet does get cached so subsequent calls to that page take only about 3 seconds for me. I think I confused myself on this issue because the page in the example was set to be uncached since it uses MaxiGallery.
So, I don’t know why Wayfinder takes such a long time to process this amount of pages. If I take the level parameter down to 2, it takes much less time, so I’m beginning to think that I’ve started to stretch the limits of wayfinder with this amount of pages. Anyone have ideas on how to make this faster for every page on the first load? Since the large main menu is the same everywhere I wonder if I could use wayfinder to write a file, and include that file instead of the snippet code.
Has anyone done anything like that before, or have a better idea??
Thanks,
James