SimplePortal
Support => English Support => Topic started by: Geri on April 13, 2009, 04:37:30 PM
-
SMF 1.8
SP 2.2
Since I installed the SP 2.2 there is a 7 secons lag before the portal loads. The same in Opera, IE, or GoogleChrome.
Exactly 7 seconds, then the page apears (almost) instantly, like just then I clicked the link.
When I access the forum page, or other pages, it loads normal.
Just when accessing the portal the lag is present.
Eatherway I acess it through favorites/bookmark links, or through a inner forum link, or using the first page button, or a external link (google) the lag is there.
What could be the cause?
I thought that one of the blocks is causing this and I tryed to deactivate them, one at the time, every time loading the portal in another tab window. No difference.
I'm confused, maybe it's not a SP problem at all, but I don't now what could be.
Could be a server problem, or...wtf? :|
-
A link to your forum please.
-
Sorry, I thought I added the adress to my profile. I did it now.
The forum is:
www.arthalia.ro
-
Would you provide me an admin account via pm and add this to your Settings.php file, just for a few minutes until I check it.
$show_db_debug = true;
-
Thank you for helping.
PM sent.
The debug shows that error:
8: Undefined index: portal_url
File: /home/arthalia/public_html/Sources/SPortal1-1.php
Line: 347
That line 347 is:
$context['page_index'] = constructPageIndex($context['portal_url'] . '?sa=articles', $context['start'], $totalArticles, $modSettings['articleperpage']);
-
subs.php atached
-
It is related to Show Local Url Titles mod. I'll ask LHVWB to check this topic. You're lucky that the author of the mod is here. :P
-
Lucky indeed. :)
And also lucky to have so a great SP team working on issues.
Especialy you sinan.
Thanks.
I guess I can change the debug in my settings.php. If needed more, say so.
-
Thanks for the feedback. This is the best part of providing support. :D
And yeah, you can remove the debug option from Settings.php file. Also don't forget to kill the temporary admin account.
----
For LHVWB: The query in question is on line 3798 and takes about 8 seconds to process.
-
Try the attached file, I have just added "Limit 1" to the db query that Sinan pointed me to, that may resolve the issue.
If that doesn't work then can you please try removing the "Publi-Shop" and "Piata muncii " blocks, one by one? To see if removing them tempoarily resolves the issue, for now that should stop it from happening. Although you could manually change the links in those BBC blocks to 'title (http://x)' to show them again without causing this issue.
The db query on line 3798, relates to finding the board name with the id, so that the Board title can be shown. Not sure why it would be running for so long, even when you have 70+ boards. I couldn't replicate it with more than 100 boards.
Could you also try posting a link like this "http://www.arthalia.ro/index.php/board,82.0.html" in a forum post? If it takes several seconds to view that post then the issue definetely isn't SP related.
-
I've analyzed that query in debug mode and it took ~8.5 seconds. That's why I said the issue is related to that.
-
One thing I did not tryed, till yesterday when I gave [SiNaN] the admin acount to look over the querry, was to deactivate the articles from the articles config. I did that and without the articles the portal loads normal.
Sorry LHVWB for not briging that up sooner. I forgot. Stupid of me not to give you all the info.
Still I uploaded that subs.php and tryed to deactivate those blocks and no change.
-
LHVWB
What do you say?
Should I remove the mod " Show local url title..." till you have the time to find a solution?
Maybe your time is limited and you don't have time to look into it now.
Or should I wait?
My forum members start to send me messages asking about the lag. Someone said that a few times he thought the forum is not loading at all and he clicked another link before the page loaded.
And for visitors its also anoyng.
For removing the mod, since it does not have a uninstall option, I guess I should delete all the lines related to
// Function to Turn a url into a title, if possible.
till I get to
// Generate a random seed and ensure it's stored in settings.
...from subs.php. And that's it. Right?
I have to decide to keep or remove the very useful mod, or to keep the lag, or to remove the articles. :|
-
Sorry, I haven't had much time for SP stuff lately.
Is the problem resolved if you temporarily remove the articles?
-
Yes when I remove (disable) the articles the lag is not there anymore.
You don't have to be sorry. I can't be that selfish to ask you to spend your time solving that problem. I'm shure you have a lot of other things to do. :)
-
Sorry, I haven't had much time for SP stuff lately.
Is the problem resolved if you temporarily remove the articles?
It does, because that is the only function which parses text.
-
bump
:)
-
Looks that there is no one with this problem but me. :nervous-happy:
Is there no one with both "Show local url title" mod and SP installed?
And, if there is someone with both installed, and... no problems like this topic, than something different must be going on. :|
-
Finaly I think I got it working. I do not now exactly how, but ...no lag anymore. :)
What I did:
I thougt I have no other option than remove the Show local url mod, so I wanted to uninstall it.
Since I did not have a uninstall option I simply delete it.
Then I tryed to manualy remove the mod from the subs.php file using the parse function and instructions from the SMF Mod's page.
Those instructions are aplicable for SMF 1.1.5 , but I thought I can use it on my subs.php. too.
I deleted the lines related to..."// Function to Turn a url into a title, if possible.", then I saw that the other code lines are different since I have the SMF 1.1.8. It got over my head to do the modifications , and I gived up.
I copy/pasted the lines I removed before, to the end of Subs.php and uploaded the file.
Now everything looks ok. No lag loading the portal page with the article activated. And the Show local url tile mod works also ok.
Why now it works, I don't have a clue. :nervous-happy:
But If you want to check it, I attach the current subs.php maybe it is useful to somebody. :)
Thanks for the feedback.
-
Hmm, sorry I haven't responded to this topic in a while, I have been fairly busy with schoolwork.
I had a quick look at those files, the 'get_ShowUrlTitle' functions appear to be exactly the same. No idea why your issue is resolved or why it was even happening in the first place. :S
I'll have a better look into this issue when I finally get around to updating that mod.
-
No problem. :)
I'm happy it works now. :D
-
Something different must be going on:
Like I said I saw that everithing loads ok.
Then I tryed logging out and navigating the forum as a guest.
There was a iven longer lag than before (around 12 secs). And this time for every page I was going to.
I logged in again, everithing was loading ok.
I disabled the articles ...logged out. No lag anymore.
( I now.... the lag was there for every page, not just the portal where the articles are, but I stilll tryed that.)
Logged in again ...enabled the articles, logged out.
Surprise....no lag anymore.
I'm speachless.
Maybe it is still some server issue...or... I don't now.
Now I have to go to work so I cannot be here to give some further info if someone is curios why this happends, and tryes to figure it out.
Hopefuly it will stay like now...with no lag. :)
-
I am very curious as to why this is happening, if its a server issue then its quite an odd one. Any information that you could give me for when I eventually get around to fixing up that mod would be most welcome.
Marking this as solved for now, feel free to post again if you have any more issues.