MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Jul 03, 2009, 09:33 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search via SMF
or Google:
modx forums
all of modxcms.com
web
MODxCMS.com
Forums
Help
Login
Register
News
:Read what MODx Developers say:
MODx Dev. Blogs
MODx Community Forums
»
Add-ons, Extensions & Elements
»
Navigation & Tagging/Taxonomy
»
Wayfinder & DropMenu
(Moderator:
kylej
)
»
Wayfinder slowness issue
Pages: [
1
]
2
Go Down
« Previous topic
Next topic »
Print
Author
Topic: Wayfinder slowness issue (Read 4615 times)
0 Members and 1 Guest are viewing this topic.
devtrench
Member
Posts: 53
Wayfinder slowness issue
«
on:
Jan 25, 2008, 05:45 PM »
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
Logged
DEVTRENCH: web development blog
::
EHLY DESIGN
rthrash
Foundation
Posts: 10,471
Re: Wayfinder slowness issue
«
Reply #1 on:
Jan 25, 2008, 05:48 PM »
Is this on a public server that we could see a link?
Logged
MODx
is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you
help us help you
,
read the wiki
, and review snippet parameters even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @
Collabpad
work
productively.
work
intelligently.
work
together.
MODx
Current
|
Dev
|
SVN Root
|
JIRA (Bugs)
|
Confluence (Revolution Wiki)
|
Fisheye SVN Browser
sottwell
Documentation Team
Posts: 8,825
Re: Wayfinder slowness issue
«
Reply #2 on:
Jan 26, 2008, 03:25 AM »
If the document is cached and the snippet call is cached, then the whole page will be cached, menu and all.
Logged
sottwell.com has moved to a lovely Solaris 10 server!
Log in
username guest, password guestuser.
Templates are now becoming available at
http://sottwell.com/templates.html
rthrash
Foundation
Posts: 10,471
Re: Wayfinder slowness issue
«
Reply #3 on:
Jan 26, 2008, 09:41 AM »
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.
Logged
MODx
is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you
help us help you
,
read the wiki
, and review snippet parameters even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @
Collabpad
work
productively.
work
intelligently.
work
together.
MODx
Current
|
Dev
|
SVN Root
|
JIRA (Bugs)
|
Confluence (Revolution Wiki)
|
Fisheye SVN Browser
devtrench
Member
Posts: 53
Re: Wayfinder slowness issue
«
Reply #4 on:
Jan 27, 2008, 10:17 PM »
Sure, here is the link to my test case. The only difference between these two pages is that the snippet code mentioned in my first post has been removed in the testindex page
Slow page with the Wayfinder code (takes about 25-30 seconds to load)
http://www.gips.org/dev
Fast page without Wayfinder code (takes about 3 seconds to load)
http://www.gips.org/dev/testindex
Let me know if you find anything out or need more information from me. Thanks for looking into this!!!
Ok, and I figured out one more thing. The this page was set to NOT be cached because it uses the Maxi gallery snippet (I forgot that I did that). When I set the page to cache, the first time it takes forever to load, but subsequent times it is much faster (about 3 seconds or less). So, does anyone know any workarounds for that?? Note that Cacheable is set to NO on the examples above to show the speed difference.
James
Logged
DEVTRENCH: web development blog
::
EHLY DESIGN
ganeshXL
Testers
Posts: 1,923
true is true
Re: Wayfinder slowness issue
«
Reply #5 on:
Jan 27, 2008, 11:09 PM »
There's something strange in line 129-131:
Code:
<?
// Use the following syntax $param = 'value';
?><li style="margin-top:10px">
Why can I view PHP via "view source" in my browser? Find out where this is coming from and delete it from that snippet/chunk or whatever it is. Maybe it's confusing the parser...
Then, you might also check if maybe the accuweather stuff is maybe slowing things down. And the usual routine checks: Are all CSS and JS files on the server? Are their paths correct? etc.
Logged
http://www.screengang.com/
ˇ
http://www.online-marketing-consulting.ch/
ˇ
http://www.dnik.ch/
ˇ
http://www.flickr.com/photos/dnik/
ganeshXL
Testers
Posts: 1,923
true is true
Re: Wayfinder slowness issue
«
Reply #6 on:
Jan 27, 2008, 11:20 PM »
Actually, I just noticed one more strange thing: The extremely slow-loading page sends UTF-8 server headers, but you declare ISO-8859-1 via HTML-tags.
And in all cases, it never hurts to check your HTML + CSS.
The W3C validator reports 187 HTML-errors and 14 CSS errors.
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.gips.org%2Fdev%2F
http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fwww.gips.org%2Fdev%2F
Logged
http://www.screengang.com/
ˇ
http://www.online-marketing-consulting.ch/
ˇ
http://www.dnik.ch/
ˇ
http://www.flickr.com/photos/dnik/
devtrench
Member
Posts: 53
Re: Wayfinder slowness issue
«
Reply #7 on:
Jan 28, 2008, 07:44 AM »
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
Logged
DEVTRENCH: web development blog
::
EHLY DESIGN
zi
MODx Special Forces /
Administrator
Posts: 3,329
May Peace Be On You
Re: Wayfinder slowness issue
«
Reply #8 on:
Jan 28, 2008, 07:56 AM »
You can also use MODx timing tags for more timing information as well. It might help.
Logged
Subscribe to
MODx Commercial Support Plans
Share and Explore websites made in MODx
--------------------------------------------------
Follow me on Twitter
My Blog
,
Resource Center
ziworks | Custom/Free MODx Templates
devtrench
Member
Posts: 53
Re: Wayfinder slowness issue
«
Reply #9 on:
Jan 28, 2008, 09:39 AM »
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
Logged
DEVTRENCH: web development blog
::
EHLY DESIGN
zi
MODx Special Forces /
Administrator
Posts: 3,329
May Peace Be On You
Re: Wayfinder slowness issue
«
Reply #10 on:
Jan 28, 2008, 09:51 AM »
An idea clicks in my mind is, use the wayfinder menu in a separate document as a content and call it in a TV with @Binding
OR
use getField? snippet to call the doc content.
Ofcourse be sure to keep that doc cached, and untick the "Empty cache?" check box to prevent cache clearing automatically.
Hope you got my point...
Logged
Subscribe to
MODx Commercial Support Plans
Share and Explore websites made in MODx
--------------------------------------------------
Follow me on Twitter
My Blog
,
Resource Center
ziworks | Custom/Free MODx Templates
bunk58
Committed to MODx
Posts: 1,397
David Bunker
Re: Wayfinder slowness issue
«
Reply #11 on:
Jan 28, 2008, 10:04 AM »
IMHO it seems that you're duplicating the menu for the second, third and fourth level items in the left column depending which page you are visiting.
Could you not have a level 1 top menu and the side menu for levels 2,3 & 4 of the parent page?
This might speed up the page loading.
David
Logged
Snippets :
Highslide Gallery
|
Fisheye Menu
|
JS Tree Menu
|
PHC Results
|
EasyNewsletter from CSV
|
Google Translate
Wiki Articles :
Custom DB table to placeholders
|
Manager Locked Out?
Website :
U.K. based MODx development
ganeshXL
Testers
Posts: 1,923
true is true
Re: Wayfinder slowness issue
«
Reply #12 on:
Jan 28, 2008, 10:12 AM »
I don't think any amount of items should slow the site down as much as your example shows.
Even your "fast" loading site (about 3 seconds) is really slow. I think it's simply a rather slow database connection.
The fact that you're including so many items with your WF call certainly doesn't speed things up.
But yes, you can of course store the Wayfinder output to a static file and include that in your template. Instead of a file you can use a chunk, or even a new document.
Just make sure the editors remember to update this chunk. You could also write a little plugin that updates your menu-chunk every time a document is created or changed. The system event would probably be OnDocFormSave. Useful API functions would be
http://wiki.modxcms.com/index.php/API:runSnippet
+
http://wiki.modxcms.com/index.php/API:getChunk
.
I wonder if there's a setChunk() / saveChunk() available too...
hmm, just found out there is apparently a putChunk() function available, though it's not documented in the Wiki...
I believe items that don't change frequently shouldn't necessarily be called via database-calls. e.g. generating an XML file via PHP + mxSQL on every new request is not as efficient as storing a file on the server and just let Apache serve it as a regular text-file.
«
Last Edit: Jan 28, 2008, 10:14 AM by ganeshXL
»
Logged
http://www.screengang.com/
ˇ
http://www.online-marketing-consulting.ch/
ˇ
http://www.dnik.ch/
ˇ
http://www.flickr.com/photos/dnik/
devtrench
Member
Posts: 53
Re: Wayfinder slowness issue
«
Reply #13 on:
Jan 28, 2008, 10:51 AM »
Quote from: bunk58 on Jan 28, 2008, 10:04 AM
IMHO it seems that you're duplicating the menu for the second, third and fourth level items in the left column depending which page you are visiting.
Could you not have a level 1 top menu and the side menu for levels 2,3 & 4 of the parent page?
This might speed up the page loading.
David
I agree with you, this was a client request that we couldn't talk them out of.
Quote from: ganeshXL on Jan 28, 2008, 10:12 AM
I don't think any amount of items should slow the site down as much as your example shows.
Even your "fast" loading site (about 3 seconds) is really slow. I think it's simply a rather slow database connection.
The fact that you're including so many items with your WF call certainly doesn't speed things up.
But yes, you can of course store the Wayfinder output to a static file and include that in your template. Instead of a file you can use a chunk, or even a new document.
Just make sure the editors remember to update this chunk. You could also write a little plugin that updates your menu-chunk every time a document is created or changed. The system event would probably be OnDocFormSave. Useful API functions would be
http://wiki.modxcms.com/index.php/API:runSnippet
+
http://wiki.modxcms.com/index.php/API:getChunk
.
I wonder if there's a setChunk() / saveChunk() available too...
hmm, just found out there is apparently a putChunk() function available, though it's not documented in the Wiki...
I believe items that don't change frequently shouldn't necessarily be called via database-calls. e.g. generating an XML file via PHP + mxSQL on every new request is not as efficient as storing a file on the server and just let Apache serve it as a regular text-file.
As I write more on this post I think what you wrote or some variation of it will be what I have to do.
I'm not a server admin, and this is the first time I've worked on a production MAMP environment, so that certainly hasn't helped me out. I've wondered about the database being slow. I know it is not caching queries, but I can't figure out how to turn that on. The database is on the same server and is only used for MODx so it shouldn't be this slow.
Thanks for all of your help and keep the ideas coming if you've got more.
James
Logged
DEVTRENCH: web development blog
::
EHLY DESIGN
ganeshXL
Testers
Posts: 1,923
true is true
Re: Wayfinder slowness issue
«
Reply #14 on:
Jan 28, 2008, 10:53 AM »
OK, I just tried this, and it works fine here:
a) create a chunk. Leave it empty. Name it whatever you want, e.g. testMenu
b) create a plugin. Enter this:
Code:
$myChunk = 'testMenu'; // your chunk name
$params['startId'] = '0';
$params['level'] = '4';
$html = addslashes($modx->runSnippet('Wayfinder', $params));
$sql= "UPDATE " . $modx->getFullTableName("site_htmlsnippets") . " SET snippet='$html' WHERE name='$myChunk'";
$result= $modx->dbQuery($sql);
c) Check the system event OnDocFormSave + save the plugin.
d) Change your template: Replace your Wayfinder call with your chunk: {{testMenu}}
Now, every time you edit a doc, the Menu code is being regenerated and stored in your chunk. This should speed up things quite a bit...
Logged
http://www.screengang.com/
ˇ
http://www.online-marketing-consulting.ch/
ˇ
http://www.dnik.ch/
ˇ
http://www.flickr.com/photos/dnik/
Pages: [
1
]
2
Go Up
Print
« Previous topic
Next topic »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Important News
=> Security Notices
-----------------------------
Commercial Support
-----------------------------
=> [CS] About Commercial Support
-----------------------------
Development & Coding
-----------------------------
=> Commercial Inquiries & Bounties
=> Core Code
===> MODx Next
===> xPDO
=> Module, Plugin & Snippet Creation and Modification
=> In Development
=> Templates
-----------------------------
Add-ons, Extensions & Elements
-----------------------------
=> Module, Plugin & Snippet Usage
=> General Repository Items Support
=> Navigation & Tagging/Taxonomy
===> Wayfinder & DropMenu
=> Creating & Repurposing Content
===> Ditto
===> Jot
===> Front-end Document Management
=> Users, Authentication & Personalization
===> WebloginPE
===> WebLogin, WebSignup and WebChangePwd
=> Rich Text Editors & File Browser
===> TinyMCE
===> FCKeditor
===> MCPuck File Browser
=> Forms, Form Processing & Anti-Spam
===> eForm
=> Search
===> AjaxSearch
=> E-business
=> Polls, Calendars, Address Book and Community
=> Third-party integrations
=> Images, Videos & Podcasts
===> MaxiGallery
=> Manager, Parser & the Core
===> Backup & Versioning
===> Doc Finder
===> ManagerManager
===> PHx
=> Templates
-----------------------------
Support
-----------------------------
=> Release Support
===> 0.9.6.3
===> 0.9.6.2
===> 0.9.6.1
===> 0.9.6
===> 0.9.5 and earlier
=> General Support
===> MODx 101
===> E-Commerce, E-Marketing, Analytics & SEO
===> Hosting Experiences
===> IIS / Windows Hosting Issues
=> Documentation, Tips & Tricks
===> Documentation Suggestions & Corrections
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Webworker Lounge
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
International Support & Translations
-----------------------------
=> Internationalization
=> Bulgarian
===> Поддръжка
=====> Често задавани въпроси
=====> Инсталация
=====> Модули, Плъгини, Снипети и код
=====> Дизайн и Шаблони
===> Документация, Ръководства и Превод
=====> Документация
=====> Ръководства
=====> Превод
===> Общество
=====> Съобщения
=====> Представете се
=====> Представете сайта си
=====> Дискусии извън MODx
=> Chinese
=> Czech
===> Oznámení
=====> Důleitá oznámení/novinky
=====> Bezpečnost
===> Komunita
=====> Oznámení
=====> Představte se, prosím
=====> Ukázky práce
=====> Různé aneb cokoli co se jinam nehodí
===> Podpora
=====> FAQ (často kladené otázky)
=====> Instalace
=====> Moduly, pluginy, "snippets & code" (ablony zdrojových kódů)
=====> Design & ablony
===> Dokumentace, tutoriály (návody) a překlady
=====> Dokumentace
=====> Tutoriály (návody)
=====> Překlady (lokalizace)
=> Dutch
===> Ondersteuning
=====> Veel gestelde vragen
=====> Modules, Plugins, Snippets & Code
=====> Design & Templates
===> Documentatie, Tutorials en Vertalingen
=====> Documentatie
=====> Tutorials
=====> Vertalingen
===> Community
=====> Aankondigingen
=====> Stel jezelf voor
=====> Site Showcase
=====> De stamkroeg
=> Filipino
===> Suporta
=====> Kadalasang tanong
=====> Instalasyon
=====> Moduler, Maidadagdag, Karagdagang mga Code
=====> Desenyo at Templates
===> Dokumentasyon, Mga Turo, Mga Salin
=====> Dokumentasyon
=====> Mga Turo
=====> Mga Salin
===> Kumunidad
=====> Anunsyo
=====> Ipakilala ang sarili
=====> Ang Galing ng pinoy
=====> Tsismisan atbp
=> Finnish
===> Tuki
=====> UKK
=====> Asennus
=====> Moduulit, liitännäiset, koodinpätkät
=====> Ulkoasu/Sivustopohjat
===> Dokumentaatio, oppaat ja käännökset
=====> Dokumentaatio
=====> Käännökset
=====> Oppaat
===> Yhteisö
=====> Tiedotteet
=====> Esittele itsesi
=====> MODx sivustosi
=====> Kahvihuone
=> French
===> Support
=====> FAQ
=====> Installation
=====> Module, plugin, snippets
=====> Design/Templates
===> Documentation, Tutoriels et Traductions
=====> Documentation
=====> Traduction
=====> Tutoriels
===> Communauté
=====> Annonces
=====> Présentez vous
=====> Vos sites
=====> Le Bistrot Français
=> German
===> Support (de)
=====> FAQ (de)
=====> Installation (de)
=====> Module, Plugins, Snippets & Code (de)
=====> Design & Templates (de)
===> Dokumentation, Tutorials und Übersetzung
=====> Dokumentation
=====> Tutorials (de)
=====> Übersetzung
===> Community (de)
=====> Ankündigungen
=====> Stellt Euch vor
=====> Beispielseiten
=====> Off Topic / Verschiedenes
=> Hebrew
===> הכרזה
=====> חדשות חשובות
=====> אבטחה
===> תמיכה
=====> התקנה
=====> תיעוד, מדריכים ותרגומים
=====> עיצוב ותבניות
=====> שאלות נפוצות
===> תיעוד, מדריכים ותרגומים
=====> תיעוד
=====> מדריכים
=====> תרגומים
===> קהילה
=====> הודעות
=====> הצג את עצמך
=====> אתרים לדוגמא
=====> כללי
=> Irish
=> Italian
===> Supporto
=====> FAQ
=====> Installazione
=====> Moduli, Plugin, Snippet e altro codice
=====> Web Design e Template
===> Documentazione, Tutorial e Traduzione
=====> Documentazione
=====> Tutorial
=====> Traduzione
===> Comunitŕ
=====> Annunci
=====> Presentazioni
=====> Siti in vetrina
=====> Chiacchiere in libertŕ
=> Japanese
===> サポート
=====> 良くある質問
=====> インストール
=====> モジュール・プラグイン・スニペット・本体
=====> デザインやテンプレート
===> マニュアル・テュートリアル・翻訳
=====> マニュアル
=====> 事例集、テュートリアル
=====> 日本語化
===> コミュニティ
=====> お知らせ
=====> MODxサイト展示場
=====> 自己紹介
=====> 雑談
=====> 国産リソース
=> Persian - فارسي
===> پشتيباني
=====> راهنما
=====> نصب
=====> ماژول , پلاگین ها , کد ها و جزییات
=====> طراحی و قالب ها
===> مستند سازی , آموزش ها و ترجمه ها
=====> مستند سازی
=====> آموزش ها
=====> ترجمه ها
===> انجمن ها
=====> اخبار
=====> معرفی کردن خود
=====> نمایش دادن سایت ها
=====> بحث های عمومی و سایر موضوعات
=> Polish
===> Wsparcie
=====> FAQ
=====> Instalacja
=====> Moduły, pluginy, snipety i kod
=====> Wygląd i szablony
===> Dokumentacja, tutoriale i tłumaczenie
=====> Dokumentacja
=====> Tutoriale
=====> Tłumaczenie
===> Społeczność
=====> Ogłoszenia
=====> Przedstaw się
=====> Twój serwis WWW
=====> Hyde Park
=> Portuguese
===> Suporte
=====> FAQ - Dúvidas Frequentes
=====> Instalaçăo
=====> Módulos, Plugins, Snippets e Código
=====> Design e Templates
===> Documentaçăo, Guias e Traduçőes
=====> Documentaçăo
=====> Guias
=====> Traduçőes
===> Comunidade
=====> Anúncios
=====> Apresente-se!
=====> Bar da esquina (fora de tópico)
=====> Portfólio de Sites
=> Russian
===> Поддержка
=====> ЧАВО (FAQ)
=====> Установка
=====> Модули, плагины, сниппеты и код
=====> Дизайны и шаблоны
===> Документация, Уроки, Перевод
=====> Документация
=====> Уроки
=====> Перевод
===> Сообщество
=====> Объявления
=====> Представьтесь публике
=====> Галерея сайтов
=====> Диван
=> Scandanavian
===> Support
=====> Frĺgor och svar
=====> Installation
=====> Moduler, plugins, snippets och kod
=====> Design & sidmallar
===> Dokumentation, guider och översättningar
=====> Dokumentation
=====> Guider
=====> Översättningar
===> Webbgemenskap
=====> Meddelanden
=====> Presentera dig själv
=====> Visa upp dina webbsidor
=====> Ordet fritt
=> Slovak
=> Spanish
===> Soporte
=====> FAQ
=====> Instalación
=====> Modulos, Plugins, Snippets & Código
=====> Diseńo y plantillas
===> Documentación, Tutoriales y Traducciones
=====> Documentatción
=====> Tutoriales
=====> Traducciones
===> Comunidad
=====> Anuncios
=====> Presentaciones personales
=====> Muestra de sitios
=====> El Café
=> Swedish
=> TÜRKÇE (Turkish)
===> Destek
=====> SSS
=====> Kurulum
=====> Modüller, Pluginler, Snippetlar & Kodlar
=====> Dizayn & Temalar
===> Belgeleme, Eğitmenler ve Çeviri
=====> Belgeleme
=====> Eğitmenler
=====> Çeviri
===> Topluluk
=====> Duyurular
=====> Kendinizi Tanıtın
=====> Site Vitrini
=====> Konu Dışı