Linklist sometimes slow (solved)

Creating and modifying plugins.
Post Reply
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Linklist sometimes slow (solved)

Post 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
Last edited by Linus on Thu Mar 06, 2008 8:25 am, edited 1 time in total.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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?
Judebert
---
Website | Wishlist | PayPal
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Post 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...
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Post 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
Cohnina
Regular
Posts: 30
Joined: Fri Oct 05, 2007 12:11 pm
Location: Aldenhoven
Contact:

Post 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 ;)).
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Post by Linus »

hhm I can´t find a linklist on your site ^^
btw: "GIMP FTW!"
Cohnina
Regular
Posts: 30
Joined: Fri Oct 05, 2007 12:11 pm
Location: Aldenhoven
Contact:

Post 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
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post 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.
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post 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.
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Post 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
mgroeninger
Regular
Posts: 546
Joined: Mon Dec 20, 2004 11:57 pm
Contact:

Post 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!
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Post 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 :(
Post Reply