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
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
PostNuke for medium-sized websites - can it handle them?
-
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 1962
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.) -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 27
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 -
- Rank: Software Foundation
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 3814
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]::.. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 27, 2005
- Posts: 115
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. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 27, 2005
- Posts: 115
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. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 27, 2005
- Posts: 115
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. -
- Rank: Software Foundation
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 3814
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).") </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]::.. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 27, 2005
- Posts: 115
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.
- Moderated by:
- Support
