Page 1 of 1

Linklist sometimes slow (solved)

Posted: Wed Mar 05, 2008 10:07 am
by Linus
Hi everybody,
yep it's me again :)
Now that my newest project is online I got a question concerning the linklist plugin. Sometimes it takes veery long to load... I can see the Sidebar title and then it takes a while until the tree is shown...
Just go on the page and click around - you will probably notice it...
Is there a way to fix this behavior?
Best Regards Andi

Posted: Wed Mar 05, 2008 3:17 pm
by judebert
Is that the box called "Mannschaften"?

It's a big JavaScript. It's completely generated by JavaScript, so it depends on the user's computer. If the computer (not your server) is busy doing other things, it might get preempted while something more important is finished.

Additionally, one of the links goes outside your site (http://www.vvp-online.de/tabellen/mixed/vvp-mc1.htm, "Spieler/-innin", if I'm not mistaken). The output of the plugin is a little hard to read, so this might be moot, but if data is being loaded from that link, and their server is slow, then your site will be slow, too.

Do you have the same problem when you don't use the JavaScript version?

Posted: Wed Mar 05, 2008 4:22 pm
by Linus
Is that the box called "Mannschaften"?
yes it is. You can see what I mean when you cycle through the tabs.
It's a big JavaScript....
yep that could be the problem... I´ve tried the "output as css tree" option but it doesn´t remember the state - which is essential in this case.
Additionally, one of the links goes outside your site...
Mmh I don´t think that this is a big problem - it´s only a link theres not data loaded...

Posted: Wed Mar 05, 2008 4:42 pm
by judebert
I clicked around a bit, and there's a delay whenever the tree is loaded. There's also a big CPU hit at that time.

I got a slightly longer delay once. My monitoring software showed an I/O hit at the time, so it was probably binding the CPU.

I think your delays are caused by the CPU hit for the JavaScript. Otherwise I encountered no significant delays.

Posted: Wed Mar 05, 2008 4:53 pm
by Linus
Alright then it´s certainly the js.
It´s not that big deal anyway - if it´s not getting worse when I add a few more links ;)
Thanks a lot Judebert

Posted: Wed Mar 05, 2008 5:37 pm
by Cohnina
Linus wrote:It´s not that big deal anyway - if it´s not getting worse when I add a few more links ;)
I added some links and thought it was much slower this morning, but now it's fine (and I guess there are more links at my blog than at yours ;)).

Posted: Wed Mar 05, 2008 5:43 pm
by Linus
hhm I can´t find a linklist on your site ^^
btw: "GIMP FTW!"

Posted: Wed Mar 05, 2008 7:11 pm
by Cohnina
Oh, there was only my "normal" homepage at my profile - sure there's no linklist ;) I now changed the link to my blog

Posted: Thu Mar 06, 2008 4:18 am
by mgroeninger
I would also say to make sure that the "Cache sidebar" setting is set to "yes". This will mean the server does less work generating the html for each page request.

Posted: Thu Mar 06, 2008 5:45 am
by mgroeninger
Actually, I just realized after my last post that the linklist plugin did not cache html when caching was turned on, only the xml/database info.

I just updated the sidebar plugin to use Cache_Lite if it is available (should be part of the bundle libraries on recent version) to cache the actual HTML output.

Edit: Forgot to mention, this will of course speed up the page generation. The original caching code minimized database access so that using the database backend was roughly as fast as using direct xml entry. This change should improve performance for the whole plugin.

Should re-cache if the xml changes (for direct xml), if you add/change/delete a link using the database backend, or if you change the display style.

If you need to clear the cache (for troubleshooting, say) you can just turn it off and save it and then turn it back on.

New version should be 1.20 and should be up on spartacus after the next update.

Please let me know if anyone runs into problems.

Posted: Thu Mar 06, 2008 7:53 am
by Linus
Mmh I never saw that cache option before...
I downloaded the "cache for everyone" from cvs and set cache sidebar to yes.
Reloaded the page and clicked around
-> yihaa - as I would say there's a great performance boost...
:lol:
Thanks a lot

Posted: Thu Mar 06, 2008 3:42 pm
by mgroeninger
You are welcome! And thanks for letting me know it helps!

Please let me know if you run into any problems with it!

Posted: Thu Mar 06, 2008 5:23 pm
by Linus
Hey, I found out, that it's much more fluid when I use Opera.
I got more CPU-Load when I use Firefox and when I cycle through the tabs (Bilder,Kontakt) the page is bouncing around because it hides the scrollbar :(