Fork me on GitHub

PostNuke for medium-sized websites - can it handle them?  Bottom

  • I've just moved 8000 sci fi weblinks from an old Links2 CGI system into PostNuke and the old CGI system was faster!

    It takes over 20 seconds to load the start page of my web links!

    Was the web links module only designed for small collections of links? SHould it take that long?

    See for yourself at:
    http://www.sadgeezer…eb_Links&file=index
  • Well the links dead right now, but if the page is loading slow for you, set the number of links per page to a lessor number, see if that helps out at all.

    It's the first option in weblinks configuaration.
    Links per page:
    (anywhere from 10 to 50 can be choosen.)
  • Hi there

    I've had the same problem with the www.uniserveuk.com USUK Directory in the past, once I got past about 2000 links the front page started taking ages to load.

    It's as if the module is looking through all the links before it creates the page, I don't know much about PHP but maybe it's because it goes through and counts the number of links and folders.

    Maybe it's possible in the future for the index page to just pull the category information and just look for the links when someone clicks on a particular category or sub-category.

    I'd be interested to hear what someone in the Dev team thinks.

    cheers
    fasteddie
  • if you like you can run a short test for yourself...

    edit /modules/Web_Links/wl-navigation.php and change

    Code

    //$cnumrows = CountSubLinks($cat_id);
                $cnumrows = "";

    then the links are not counted anymore. please report if this enhances the performance.

    --
    regards from germany
    ..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..
  • I've not tried it yet, sorry guys. I'm having hassles with my ISP and the SQL database (their end) :(

    Your suggestions are hugely helpful and I assure you that I will test and report back as soon as I have things working again.

    Cheers.
  • larsneo

    if you like you can run a short test for yourself...

    edit /modules/Web_Links/wl-navigation.php and change

    Code

    //$cnumrows = CountSubLinks($cat_id);
                $cnumrows = "";

    then the links are not counted anymore. please report if this enhances the performance.


    I added your code change to my test site and the answer is: YES! Most definately! I'm tempted to say that the difference was exponential :) but alas, it was only about 75% faster :)

    I half expected to see the links and categories counter dissapear from the bottom of the links page, but it still managed to show the correct number of links and categories (Even after I added a new one).

    It makes me wonder why

    Code

    $cnumrows = CountSubLinks($cat_id);

    was there in the first palce ;)

    Having said that, when I load my main Sci Fi TV links category (http://www.sadgeezer…&req=viewlink&cid=1), it takes 25 seconds to load compared with the 4 seconds to load the main start page (http://www.sadgeezer…eb_Links&file=index).

    Why is that? Is there another CountSubLinks($cat_id) that we missed? ;)

    Is there anything I can do to speed things up?

    Thanks very much for your help larsneo. It's much appreciated.

    :D

    PS> I chopped out a few corrupted links and categories so the test was with 7422 links and 208 categories.
  • Infopro

    Well the links dead right now, but if the page is loading slow for you, set the number of links per page to a lessor number, see if that helps out at all.

    It's the first option in weblinks configuaration.
    Links per page:
    (anywhere from 10 to 50 can be choosen.)


    THanks for that, I'm not sure that it's the problem though. Pages with a large number of links on them seem to load quite quickly, but my main Sci Fi Shows category page (which has no weblinks on it) took 55 seconds!

    (Some of that is because I am stuck with a really dodgy ISP at the moment, but the page still is the slowest page to load - it has 40 categories with around 1500 weblinks in them.)

    I think it's wrong to rely on the system to provide the number of links in the database (or per category) if PN has to count them every time the relevant page is loaded! It's a huge drain on resources when a links database reaches more than 100 links. Could we not have a links system that kept track of link numbers with a field in the category table? Then every time a link was added or deleted it would update the relevant category (and parent category).

    I'm guesing that it's not a quick fix, but I don't think it's very difficult either. The current system causes an intollerable slowness. Even if I have a better ISP (soon) I don't think it would make the time delay acceptable.
  • Quote

    Why is that? Is there another CountSubLinks($cat_id) that we missed?


    think so. check wl-viewlink.php (somewhere around line 119, may differ since i did some other changes to the CVS version) and change the line

    Code

    .pnVarPrepForDisplay($title)."</a><font class=\"pn-normal\"> (".CountSubLinks($sid).")&nbsp;</font>";

    to

    Code

    .pnVarPrepForDisplay($title)."</a>";


    to get rid of the CountSubLinks display - please post the result ;)

    --
    regards from germany
    ..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::..
  • Yes, that certainly is better.

    At least I think it is :/ My ISP is having problems with the server and sometimes the page loads really slowely and sometimes really quickly.

    You can see for youself if you like. The hardest page to load on my test site is the TV Science Fiction Shows page at:
    http://www.sadgeezer.net/html/modules.php?op=modload&name=Web_Links&file=index&req=viewlink&cid=234

    There are around 1400 links in 40 categories and I'm sure that there is something else that is counting the links. I had a look at the code myself, but can't find it.
  • Hi

    I've just made those 2 suggestions on UniserveUK.com and it seems to have worked a treat in our USUK Directory.

    Many thanks

    fasteddie

This list is based on users active over the last 60 minutes.