1 tek1024 Sep 16, 2005 09:12
3 tek1024 Nov 05, 2005 08:44
I never did actually thank you for your help--thank you!
It's basically querying the phpBB code through embedded JavaScript--so that's what, three levels of computation deep? I'm going to look into the RSS phpBB MODs instead.
Thanks for your reply and be well!
4 yabba Nov 05, 2005 10:26
If you have b2evo and phpbb in the same database, try doing something like this instead of using your javascript
<?php
$sql = 'SELECT DISTINCT phpbb_posts.topic_id,phpbb_topics.topic_title
FROM phpbb_posts JOIN phpbb_topics ON phpbb_topics.topic_id = phpbb_posts.topic_id
ORDER BY post_time DESC limit 10';
$topics = $DB->get_results( $sql, ARRAY_A);
echo '<ul>';
foreach( $topics as $topic)
echo '<li><a href="http://thinkforums.org/viewtopic.php?t='.$topic['topic_id'].'" title="read this post">'.$topic['topic_title'].'</a></li>';
echo '</ul>'
?>
¥
there are a few ways to handle that, though to be honest I didnt think it loaded all that slow. There was a slight delay with some white space, but it wasnt too terrifically long.
both domains on the same box .. ok. same mysql db also or no? I could donwload that phpBB mod and look but i will let you answer instead.. is that mod going out to the domain via some web technology, or is it making a direct db call?
You might do a cpl things .. but first I would benchmark that page. You can do that a cpl ways but for now b2evo has a built in debugger : inside b2evocore/_functions.php locate the line that says
and make that true. After doing that youre going to see way too much info at the bottom of your page. What your most interested in there will be the amount of database calls, AND the page generation time (php processing)...
If it still looks like a php issue and not the db calls thats slowing things down then you could cache those topic titles, and go get them using a simple script OR you could just use a simple script that queries that database (i would do one of those 2) or you could parse the RSS feed for your forum (IF thats not how that mod is already doing it). The RSS feed mods for phpBB are very easy to install -- parsing out the proper info from there isnt much harder.