Site Problems

Anything!

Site Problems

Postby Coorong » Sat Feb 17, 2007 10:20 am

I have noticed over the past month or so (for me) reaction time on this site has slowed. As I am on cable I am surprised. Mostly when I click on a topic, have to do it 2 or 3 times to respond. Sometimes have to right click and open. Even this can take 5-10 seconds.

Not experincing this on any other forums or programmes I run. Any suggestions?

Footnote: submitting this post took 37 seconds which is more usual now than before
User avatar
Coorong
League - Best 21
 
 
Posts: 1524
Joined: Thu Oct 27, 2005 8:48 am
Location: In the Coaches Box
Has liked: 0 time
Been liked: 8 times

Postby Footy Chick » Sat Feb 17, 2007 11:07 am

Ditto Coorong, only I've only noticed it over the past week, I have to right click and open most topics, or I'm getting the critical error thing again....
User avatar
Footy Chick
Moderator
 
 
Posts: 26905
Joined: Wed Nov 02, 2005 1:44 pm
Location: anywhere I want to be...
Has liked: 1771 times
Been liked: 2192 times

Postby Punk Rooster » Sat Feb 17, 2007 11:15 am

yes, I agree.
The only solution is to burn Wedgie's house down.
Ralph Wiggum wrote:That's where I saw the leprechaun. He told me to burn things

Ken Farmer>John Coleman

Hindmarsh Pest Control
User avatar
Punk Rooster
Coach
 
 
Posts: 11948
Joined: Thu Oct 27, 2005 9:30 am
Location: Paper Street Soap Company
Has liked: 16 times
Been liked: 16 times
Grassroots Team: Fitzroy

Postby Thiele » Sat Feb 17, 2007 11:26 am

I agree to
James Ezard Joint 2009 Magarey Medalist

Personal views only not views of the West Adelaide Footy Club or Bedford Indstries
User avatar
Thiele
Coach
 
 
Posts: 28406
Joined: Thu Nov 03, 2005 12:07 pm
Location: The wolf packs den
Has liked: 183 times
Been liked: 118 times

Postby Footy Chick » Sat Feb 17, 2007 11:38 am

Thiele wrote:I agree to


to burn Wedgies house down?

Thats a bit harsh :shock:
User avatar
Footy Chick
Moderator
 
 
Posts: 26905
Joined: Wed Nov 02, 2005 1:44 pm
Location: anywhere I want to be...
Has liked: 1771 times
Been liked: 2192 times

Postby Thiele » Sat Feb 17, 2007 11:40 am

Falcon Chick wrote:
Thiele wrote:I agree to


to burn Wedgies house down?

Thats a bit harsh :shock:
Not to burnSir Wedgies house down but i problems with the site
James Ezard Joint 2009 Magarey Medalist

Personal views only not views of the West Adelaide Footy Club or Bedford Indstries
User avatar
Thiele
Coach
 
 
Posts: 28406
Joined: Thu Nov 03, 2005 12:07 pm
Location: The wolf packs den
Has liked: 183 times
Been liked: 118 times

Postby Thiele » Sat Feb 17, 2007 11:40 am

Falcon Chick wrote:
Thiele wrote:I agree to


to burn Wedgies house down?

Thats a bit harsh :shock:
Not to burn Sir Wedgies house down but i problems with the site
James Ezard Joint 2009 Magarey Medalist

Personal views only not views of the West Adelaide Footy Club or Bedford Indstries
User avatar
Thiele
Coach
 
 
Posts: 28406
Joined: Thu Nov 03, 2005 12:07 pm
Location: The wolf packs den
Has liked: 183 times
Been liked: 118 times

Postby magpie in the 80's » Sat Feb 17, 2007 11:56 am

i also concur to this problem
I went to a fight the other night, and a hockey game broke out. - Rodney Dangerfield (1921 - 2004)
User avatar
magpie in the 80's
Coach
 
 
Posts: 35437
Joined: Fri Apr 14, 2006 7:56 pm
Location: in the quiz books
Has liked: 1 time
Been liked: 24 times

Postby Wedgie » Sat Feb 17, 2007 12:49 pm

Hmmm, I haven't had any probs but thanks for making me aware of it, I'll try messing around with the servers and see if I can speed things up, might be just the sheer weight of numbers of posts on here and the only solution may be to cull posts after a certain timeframe, I know spelly would hate that option so it'll be my last one.
I'll see what I can do folks and apologies for any slowness.
User avatar
Wedgie
Site Admin
 
 
Posts: 51721
Joined: Thu Oct 27, 2005 8:00 am
Has liked: 2153 times
Been liked: 4093 times
Grassroots Team: Noarlunga

Postby Wedgie » Sat Feb 17, 2007 1:03 pm

Ive found a couple of mods that may quicken up the website, I'll try installing them over the weekend as they take about an hour to change all the code on.
User avatar
Wedgie
Site Admin
 
 
Posts: 51721
Joined: Thu Oct 27, 2005 8:00 am
Has liked: 2153 times
Been liked: 4093 times
Grassroots Team: Noarlunga

Postby am Bays » Sat Feb 17, 2007 1:06 pm

Wedgie wrote:Ive found a couple of mods that may quicken up the website, I'll try installing them over the weekend as they take about an hour to change all the code on.


So us old mods are sacked are we???? :shock: :shock:
Let that be a lesson to you Port, no one beats the Bays five times in a row in a GF and gets away with it!!!
User avatar
am Bays
Coach
 
 
Posts: 19800
Joined: Sat Dec 17, 2005 11:04 pm
Location: The back bar at Lennies
Has liked: 184 times
Been liked: 2135 times

Postby Wedgie » Sat Feb 17, 2007 1:08 pm

1980 Tassie Medalist wrote:
Wedgie wrote:Ive found a couple of mods that may quicken up the website, I'll try installing them over the weekend as they take about an hour to change all the code on.


So us old mods are sacked are we???? :shock: :shock:


lol, sorry, modifications, not moderators! :wink:
User avatar
Wedgie
Site Admin
 
 
Posts: 51721
Joined: Thu Oct 27, 2005 8:00 am
Has liked: 2153 times
Been liked: 4093 times
Grassroots Team: Noarlunga

Postby Snaggletooth Tiger » Sat Feb 17, 2007 1:58 pm

1980 Tassie Medalist wrote:So us old mods are sacked are we???? :shock: :shock:


Cue for a pissweak 'QUADROPHENIA' reference I reckon! :wink: :roll:
GO THE GROWL!!!


"Shut the gate on this one Maxy... It's the Duck's Guts!"
User avatar
Snaggletooth Tiger
League Bench Warmer
 
 
Posts: 1468
Joined: Thu Aug 24, 2006 10:28 pm
Location: In a world of me own!
Has liked: 0 time
Been liked: 0 time

Postby Coorong » Sat Feb 17, 2007 2:02 pm

You must have tweaked someting allready as I am now getting a much speedier response.
User avatar
Coorong
League - Best 21
 
 
Posts: 1524
Joined: Thu Oct 27, 2005 8:48 am
Location: In the Coaches Box
Has liked: 0 time
Been liked: 8 times

Postby Wedgie » Sat Feb 17, 2007 2:32 pm

Nah, but now I have, seems to be heaps quicker, I didn't realise how slow it had got.
Can people let me know if its still slow for them or if its a lot quicker now?
User avatar
Wedgie
Site Admin
 
 
Posts: 51721
Joined: Thu Oct 27, 2005 8:00 am
Has liked: 2153 times
Been liked: 4093 times
Grassroots Team: Noarlunga

Postby Thiele » Sat Feb 17, 2007 2:47 pm

its quicker now thanks :)
James Ezard Joint 2009 Magarey Medalist

Personal views only not views of the West Adelaide Footy Club or Bedford Indstries
User avatar
Thiele
Coach
 
 
Posts: 28406
Joined: Thu Nov 03, 2005 12:07 pm
Location: The wolf packs den
Has liked: 183 times
Been liked: 118 times

Postby Punk Rooster » Sat Feb 17, 2007 2:50 pm

there's no reason why we still can't do what I suggested! :wink:
Ralph Wiggum wrote:That's where I saw the leprechaun. He told me to burn things

Ken Farmer>John Coleman

Hindmarsh Pest Control
User avatar
Punk Rooster
Coach
 
 
Posts: 11948
Joined: Thu Oct 27, 2005 9:30 am
Location: Paper Street Soap Company
Has liked: 16 times
Been liked: 16 times
Grassroots Team: Fitzroy

Postby Wedgie » Sat Feb 17, 2007 3:18 pm

Coorong wrote:You must have tweaked someting allready as I am now getting a much speedier response.

Actually I just remembered that I did upload a new config file earlier beforI changed the rest of the code so that might have helped.

Here's the "little" bit of code I had to change to get it working as it now is:

Code: Select all
#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
Create a cache/ directory in your phpBB root folder and CHMOD to 777.

#
#-----[ COPY ]------------------------------------------
# Upload this if you have extreme styles MOD installed.
copy admin/xs_cached_generation.cfg to admin/xs_cached_generation.cfg

#
#-----[ OPEN ]------------------------------------------
#
common.php

#
#-----[ FIND ]------------------------------------------
#
// 
// Define some basic configuration arrays this also prevents

#
#-----[ BEFORE, ADD ]------------------------------------------
#
function microtime_float() 

   list($usec, $sec) = explode(" ", microtime()); 
   return ((float)$usec + (float)$sec); 

 
$GLOBALS['page_gen_start'] = microtime_float();

#
#-----[ FIND ]------------------------------------------
#
   FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
   FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ OPEN ]------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------
#
   ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
   ORDER BY c.cat_order";
if( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ FIND ]------------------------------------------
#
         break;
   }
   if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
         break;
   }
   if ( !($result = $db->sql_query($sql, false, 'posts_')) )

#
#-----[ FIND ]------------------------------------------
#
      ORDER BY aa.forum_id, u.user_id";
   if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
      ORDER BY aa.forum_id, u.user_id";
   if ( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ FIND ]------------------------------------------
#
      ORDER BY aa.forum_id, g.group_id";
   if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
      ORDER BY aa.forum_id, g.group_id";
   if ( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ OPEN ]------------------------------------------
#
viewforum.php

#
#-----[ FIND ]------------------------------------------
#
      WHERE forum_id = $forum_id";
   if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
      WHERE forum_id = $forum_id";
   if ( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ FIND ]------------------------------------------
#
         WHERE forum_id = $forum_id";
      if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
         WHERE forum_id = $forum_id";
      if ( !($result = $db->sql_query($sql, false, 'posts_')) )

#
#-----[ FIND ]------------------------------------------
#
   GROUP BY u.user_id, u.username 
   ORDER BY u.user_id";
if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
   GROUP BY u.user_id, u.username 
   ORDER BY u.user_id";
if ( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ FIND ]------------------------------------------
#
   GROUP BY g.group_id, g.group_name 
   ORDER BY g.group_id";
if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
   GROUP BY g.group_id, g.group_name 
   ORDER BY g.group_id";
if ( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ FIND ]------------------------------------------
#
         AND p.post_time >= $min_topic_time";

   if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
         AND p.post_time >= $min_topic_time";

   if ( !($result = $db->sql_query($sql, false, 'posts_')) )

#
#-----[ FIND ]------------------------------------------
#
   ORDER BY t.topic_last_post_id DESC ";
if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
   ORDER BY t.topic_last_post_id DESC ";
if ( !($result = $db->sql_query($sql, false, 'posts_')) )

#
#-----[ FIND ]------------------------------------------
#
$topic_rowset = array();

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$cached1 = $db->cached;

#
#-----[ FIND ]------------------------------------------
#
   LIMIT $start, ".$board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
   LIMIT $start, ".$board_config['topics_per_page'];
if ( !($result = $db->sql_query($sql, false, 'posts_')) )

#
#-----[ FIND ]------------------------------------------
#
$total_topics = 0;

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$cached2 = $db->cached;

#
#-----[ FIND ]------------------------------------------
#
//
// Total topics ...
//

#
#-----[ BEFORE, ADD ]------------------------------------------
#

if($cached1 || $cached2)
{
   $update_list = array();
   for($i=0; $i<count($topic_rowset); $i++)
   {
      $update_list[] = $topic_rowset[$i]['topic_id'];
   }
   if(count($update_list))
   {
      $sql = "SELECT topic_id, topic_views FROM " . TOPICS_TABLE . " WHERE topic_id IN (" . implode(', ', $update_list) . ")";
      $list = array();
      $result = $db->sql_query($sql);
      while( $row = $db->sql_fetchrow($result) )
      {
         $list[$row['topic_id']] = $row['topic_views'];
      }
      $db->sql_freeresult($result);
      for($i=0; $i<count($topic_rowset); $i++)
      {
         if(isset($list[$topic_rowset[$i]['topic_id']]))
         {
            $topic_rowset[$i]['topic_views'] = $list[$topic_rowset[$i]['topic_id']];
         }
      }
      unset($list);
   }
}

#
#-----[ OPEN ]------------------------------------------
#
groupcp.php

#
#-----[ FIND ]------------------------------------------
#
   $message = $lang['Group_type_updated'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');



#-----[ AFTER, ADD ]------------------------------------------ 

   $db->clear_cache();

#
#-----[ FIND ]------------------------------------------
#
   $message = $lang['Group_joined'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');


#-----[ AFTER, ADD ]------------------------------------------ 

   $db->clear_cache();

#
#-----[ FIND ]------------------------------------------
#
      $message = $lang['Unsub_success'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=$group_id") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');


#-----[ AFTER, ADD ]------------------------------------------ 

      $db->clear_cache();

#
#-----[ FIND ]------------------------------------------
#
                  message_die(GENERAL_ERROR, 'Could not update user group table', '', __LINE__, __FILE__, $sql);
               }


#-----[ AFTER, ADD ]------------------------------------------ 
#
               $db->clear_cache();

#
#-----[ OPEN ]------------------------------------------
#
modcp.php

#
#-----[ FIND ]------------------------------------------
#
         message_die(GENERAL_MESSAGE, $lang['Topics_Removed'] . '<br /><br />' . $l_redirect);


#-----[ BEFORE, ADD ]------------------------------------------ 
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            $message = $lang['Topics_Moved'] . '<br /><br />';


#-----[ AFTER, ADD ]------------------------------------------ 
#
            $db->clear_cache('posts_');
#
#-----[ FIND ]------------------------------------------
#
      message_die(GENERAL_MESSAGE, $lang['Topics_Locked'] . '<br /><br />' . $message);


#-----[ BEFORE, ADD ]------------------------------------------ 
#
      $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
      message_die(GENERAL_MESSAGE, $lang['Topics_Unlocked'] . '<br /><br />' . $message);


#-----[ BEFORE, ADD ]------------------------------------------ 
#
      $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            $message = $lang['Topic_split'] . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&amp;sid=" . $userdata['session_id'] . '">', '</a>');


#-----[ AFTER, ADD ]------------------------------------------ 
#
            $db->clear_cache('posts_');

#
#-----[ OPEN ]------------------------------------------
#
includes/auth.php

#
#-----[ FIND ]------------------------------------------
#
            AND a.group_id = ug.group_id
            $forum_match_sql";
      if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
            AND a.group_id = ug.group_id
            $forum_match_sql";
      if ( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]------------------------------------------
#
            FROM " . FORUMS_TABLE;
         break;
   }

   if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
            FROM " . FORUMS_TABLE;
         break;
   }

   if ( !($result = $db->sql_query($sql, false, 'posts_')) )


#-----[ FIND ]------------------------------------------ 

   $row = $db->sql_fetchrow($result); 
 

#-----[ AFTER, ADD ]------------------------------------------ 

   $db->sql_freeresult($result); 

#
#-----[ FIND ]------------------------------------------
#
      ORDER BY c.cat_order";
   if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
      ORDER BY c.cat_order";
   if ( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ FIND ]------------------------------------------
#
         ORDER BY cat_id, forum_order";
      if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#

         ORDER BY cat_id, forum_order";
      if ( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ FIND ]------------------------------------------
#
      FROM  " . WORDS_TABLE;
   if( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
      FROM  " . WORDS_TABLE;
   if( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ OPEN ]------------------------------------------
#
includes/functions_post.php

#
#-----[ FIND ]------------------------------------------
#
            FROM " . BANLIST_TABLE;
         if (!($result = $db->sql_query($sql)))

#
#-----[ REPLACE WITH ]------------------------------------------
#
            FROM " . BANLIST_TABLE;
         if (!($result = $db->sql_query($sql, false, true)))

#
#-----[ FIND ]------------------------------------------
#
      ORDER BY smilies_id";
   if ($result = $db->sql_query($sql))

#
#-----[ REPLACE WITH ]------------------------------------------
#
      ORDER BY smilies_id";
   if ($result = $db->sql_query($sql, false, true))

#
#-----[ FIND ]------------------------------------------
#
   if (!$db->sql_query($sql, BEGIN_TRANSACTION))
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
   $sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message',  bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
   if (!$db->sql_query($sql))
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
      $sql = (!$post_data['has_poll']) ? "INSERT INTO " . VOTE_DESC_TABLE . " (topic_id, vote_text, vote_start, vote_length) VALUES ($topic_id, '$poll_title', $current_time, " . ($poll_length * 86400) . ")" : "UPDATE " . VOTE_DESC_TABLE . " SET vote_text = '$poll_title', vote_length = " . ($poll_length * 86400) . " WHERE topic_id = $topic_id";
      if (!$db->sql_query($sql))
      {
#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            ORDER BY vote_option_id ASC";
         if (!($result = $db->sql_query($sql)))
         {

#
#-----[ AFTER, ADD ]------------------------------------------
#
            $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            $sql = ($mode != "editpost" || !isset($old_poll_result[$option_id])) ? "INSERT INTO " . VOTE_RESULTS_TABLE . " (vote_id, vote_option_id, vote_option_text, vote_result) VALUES ($poll_id, $poll_option_id, '$option_text', $poll_result)" : "UPDATE " . VOTE_RESULTS_TABLE . " SET vote_option_text = '$option_text', vote_result = $poll_result WHERE vote_option_id = $option_id AND vote_id = $poll_id";
            if (!$db->sql_query($sql))
            {
#
#-----[ AFTER, ADD ]------------------------------------------
#
               $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
               AND vote_id = $poll_id";
         if (!$db->sql_query($sql))
         {

#
#-----[ AFTER, ADD ]------------------------------------------
#
            $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
               AND u.user_id = tw.user_id";
      if (!($result = $db->sql_query($sql)))
      {

#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
   $message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');

#
#-----[ AFTER, ADD ]------------------------------------------
#
   $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
               WHERE topic_id = $topic_id";
            if (!($result = $db->sql_query($sql)))
            {

#
#-----[ AFTER, ADD ]------------------------------------------
#
               $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
               WHERE forum_id = $forum_id";
            if (!($result = $db->sql_query($sql)))
            {

#
#-----[ AFTER, ADD ]------------------------------------------
#
               $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            WHERE topic_id = $topic_id";
         if (!($result = $db->sql_query($sql)))
         {

#
#-----[ AFTER, ADD ]------------------------------------------
#
            $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
      WHERE forum_id = $forum_id";
   if (!$db->sql_query($sql))
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
         WHERE topic_id = $topic_id";
      if (!$db->sql_query($sql))
      {

#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
         WHERE user_id = $user_id";
      if (!$db->sql_query($sql, END_TRANSACTION))
      {

#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');


#
#-----[ FIND ]------------------------------------------
#
   return;
}

//
// Delete a post/poll
//

#
#-----[ BEFORE, ADD ]------------------------------------------
#
   $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
      $sql = "DELETE FROM " . POSTS_TABLE . "
         WHERE post_id = $post_id";
      if (!$db->sql_query($sql))
      {

#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
      $sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
         WHERE post_id = $post_id";
      if (!$db->sql_query($sql))
      {


#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
                  OR topic_moved_id = $topic_id";
            if (!$db->sql_query($sql))
            {

#
#-----[ AFTER, ADD ]------------------------------------------
#
               $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
               WHERE topic_id = $topic_id";
            if (!$db->sql_query($sql))
            {

#
#-----[ AFTER, ADD ]------------------------------------------
#
               $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
      $sql = "DELETE FROM " . VOTE_DESC_TABLE . "
         WHERE topic_id = $topic_id";
      if (!$db->sql_query($sql))
      {

#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
      $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
         WHERE vote_id = $poll_id";
      if (!$db->sql_query($sql))
      {
#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
      $sql = "DELETE FROM " . VOTE_USERS_TABLE . "
         WHERE vote_id = $poll_id";
      if (!$db->sql_query($sql))
      {

#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
   $message .=  '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');

#
#-----[ AFTER, ADD ]------------------------------------------
#
   $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            message_die(GENERAL_ERROR, 'Could not obtain banlist', '', __LINE__, __FILE__, $sql);

#
#-----[ BEFORE, ADD ]------------------------------------------
#
            $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            AND user_id = " . $userdata['user_id'];
      if (!($result = $db->sql_query($sql)))
      {
#
#-----[ AFTER, ADD ]------------------------------------------
#
         $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            WHERE topic_id = $topic_id
               AND user_id = " . $userdata['user_id'];
         if (!$db->sql_query($sql))
         {
#
#-----[ AFTER, ADD ]------------------------------------------
#
            $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
            VALUES (" . $userdata['user_id'] . ", $topic_id, 0)";
         if (!$db->sql_query($sql))
         {

#
#-----[ AFTER, ADD ]------------------------------------------
#
            $db->clear_cache('posts_');

#
#-----[ FIND ]------------------------------------------
#
}

//
// Fill smiley templates (or just the variables) with smileys
// Either in a window or inline
//

#
#-----[ BEFORE, ADD ]------------------------------------------
#
   $db->clear_cache('posts_');


#
#-----[ OPEN ]------------------------------------------
#
includes/sessions.php

#
#-----[ FIND ]------------------------------------------
#
         OR ban_email LIKE '" . substr(str_replace("\'", "''", $userdata['user_email']), strpos(str_replace("\'", "''", $userdata['user_email']), "@")) . "'";
   }
   if ( !($result = $db->sql_query($sql)) )

#
#-----[ REPLACE WITH ]------------------------------------------
#
         OR ban_email LIKE '" . substr(str_replace("\'", "''", $userdata['user_email']), strpos(str_replace("\'", "''", $userdata['user_email']), "@")) . "'";
   }
   if ( !($result = $db->sql_query($sql, false, true)) )

#
#-----[ OPEN ]------------------------------------------
#
#
mysql.php

#
#-----[ FIND ]------------------------------------------
#
   var $num_queries = 0;

#
#-----[ AFTER, ADD ]------------------------------------------
#
   var $caching = false;
   var $cached = false;
   var $cache = array();

#
#-----[ FIND ]------------------------------------------
#
   function sql_query($query = "", $transaction = FALSE)

#
#-----[ REPLACE WITH ]------------------------------------------
#
   function sql_query($query = "", $transaction = FALSE, $cache = false)

#
#-----[ FIND ]------------------------------------------
#
      // Remove any pre-existing queries
      unset($this->query_result);

#
#-----[ AFTER, ADD ]------------------------------------------
#
      // Check cache
      $this->caching = false;
      $this->cache = array();
      $this->cached = false;
      if($query !== '' && $cache)
      {
         global $phpbb_root_path;
         $hash = md5($query);
         if(strlen($cache))
         {
            $hash = $cache . $hash;
         }
         $filename = $phpbb_root_path . 'cache/sql_' . $hash . '.php';
         if(@file_exists($filename))
         {
            $set = array();
            include($filename);
            $this->cache = $set;
            $this->cached = true;
            $this->caching = false;
            return 'cache';
         }
//         echo 'cache is missing: ', $filename, '<br />';
         $this->caching = $hash;
      }
      // not cached
//      echo 'sql: ', htmlspecialchars($query), '<br />';

#
#-----[ FIND ]------------------------------------------
#
   function sql_numrows($query_id = 0)
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      if($query_id === 'cache' && $this->cached)
      {
         return count($this->cache);
      }

#
#-----[ FIND ]------------------------------------------
#
   function sql_fetchrow($query_id = 0)
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      if($query_id === 'cache' && $this->cached)
      {
         return count($this->cache) ? array_shift($this->cache) : false;
      }

#
#-----[ FIND ]------------------------------------------
#
      if($query_id)
      {
         $this->row[$query_id] = @mysql_fetch_array($query_id);


#
#-----[ AFTER, ADD ]------------------------------------------
#
         if($this->caching)
         {
            if($this->row[$query_id] === false)
            {
               $this->write_cache();
            }
            $this->cache[] = $this->row[$query_id];
         }

#
#-----[ FIND ]------------------------------------------
#
   function sql_fetchrowset($query_id = 0)
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      if($query_id === 'cache' && $this->cached)
      {
         return $this->cache;
      }

#
#-----[ FIND ]------------------------------------------
#
         unset($this->row[$query_id]);
         while($this->rowset[$query_id] = @mysql_fetch_array($query_id))
         {

#
#-----[ AFTER, ADD ]------------------------------------------
#
            if($this->caching)
            {
               if($this->row[$query_id] === false)
               {
                  $this->write_cache();
               }
               $this->cache[] = $this->row[$query_id];
            }

#
#-----[ FIND ]------------------------------------------
#
            $result[] = $this->rowset[$query_id];
         }

#
#-----[ AFTER, ADD ]------------------------------------------
#
         if($this->caching)
         {
            $this->write_cache();
         }

#
#-----[ FIND ]------------------------------------------
#
   function sql_freeresult($query_id = 0){

#
#-----[ AFTER, ADD ]------------------------------------------
#
      if($query_id === 'cache')
      {
         $this->caching = false;
         $this->cached = false;
         $this->cache = array();
      }
      if($this->caching)
      {
         $this->write_cache();
      }

#
#-----[ FIND ]------------------------------------------
#
} // class sql_db

#
#-----[ BEFORE, ADD ]------------------------------------------
#
   function write_cache()
   {
      if(!$this->caching)
      {
         return;
      }
      global $phpbb_root_path;
      $f = fopen($phpbb_root_path . 'cache/sql_' . $this->caching . '.php', 'w');
      $data = var_export($this->cache, true);
      @fputs($f, '<?php $set = ' . $data . '; ?>');
      @fclose($f);
      @chmod($phpbb_root_path . 'cache/sql_' . $this->caching . '.php', 0777);
      $this->caching = false;
      $this->cached = false;
      $this->cache = array();
   }

   function clear_cache($prefix = '')
   {
      global $phpbb_root_path;
      $this->caching = false;
      $this->cached = false;
      $this->cache = array();
      $prefix = 'sql_' . $prefix;
      $prefix_len = strlen($prefix);
      $res = opendir($phpbb_root_path . 'cache');
      if($res)
      {
         while(($file = readdir($res)) !== false)
         {
            if(substr($file, 0, $prefix_len) === $prefix)
            {
               @unlink($phpbb_root_path . 'cache/' . $file);
            }
         }
      }
      @closedir($res);
   }

#
#-----[ OPEN ]------------------------------------------
#
#
mysql4.php

#
#-----[ FIND ]------------------------------------------
#
   var $num_queries = 0;

#
#-----[ AFTER, ADD ]------------------------------------------
#
   var $caching = false;
   var $cached = false;
   var $cache = array();

#
#-----[ FIND ]------------------------------------------
#
   function sql_query($query = "", $transaction = FALSE)

#
#-----[ REPLACE WITH ]------------------------------------------
#
   function sql_query($query = "", $transaction = FALSE, $cache = false)

#
#-----[ FIND ]------------------------------------------
#
      // Remove any pre-existing queries
      unset($this->query_result);

#
#-----[ AFTER, ADD ]------------------------------------------
#
      // Check cache
      $this->caching = false;
      $this->cache = array();
      $this->cached = false;
      if($query !== '' && $cache)
      {
         global $phpbb_root_path;
         $hash = md5($query);
         if(strlen($cache))
         {
            $hash = $cache . $hash;
         }
         $filename = $phpbb_root_path . 'cache/sql_' . $hash . '.php';
         if(@file_exists($filename))
         {
            $set = array();
            include($filename);
            $this->cache = $set;
            $this->cached = true;
            $this->caching = false;
            return 'cache';
         }
//         echo 'cache is missing: ', $filename, '<br />';
         $this->caching = $hash;
      }
      // not cached
//      echo 'sql: ', htmlspecialchars($query), '<br />';

#
#-----[ FIND ]------------------------------------------
#
   function sql_numrows($query_id = 0)
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      if($query_id === 'cache' && $this->cached)
      {
         return count($this->cache);
      }

#
#-----[ FIND ]------------------------------------------
#
   function sql_fetchrow($query_id = 0)
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      if($query_id === 'cache' && $this->cached)
      {
         return count($this->cache) ? array_shift($this->cache) : false;
      }

#
#-----[ FIND ]------------------------------------------
#
      if( $query_id )
      {
         $this->row[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC);

#
#-----[ AFTER, ADD ]------------------------------------------
#
         if($this->caching)
         {
            if($this->row[$query_id] === false)
            {
               $this->write_cache();
            }
            $this->cache[] = $this->row[$query_id];
         }

#
#-----[ FIND ]------------------------------------------
#
   function sql_fetchrowset($query_id = 0)
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      if($query_id === 'cache' && $this->cached)
      {
         return $this->cache;
      }

#
#-----[ FIND ]------------------------------------------
#
         unset($this->row[$query_id]);
         while($this->rowset[$query_id] = mysql_fetch_array($query_id, MYSQL_ASSOC))
         {

#
#-----[ AFTER, ADD ]------------------------------------------
#
            if($this->caching)
            {
               if($this->row[$query_id] === false)
               {
                  $this->write_cache();
               }
               $this->cache[] = $this->row[$query_id];
            }

#
#-----[ FIND ]------------------------------------------
#
            $result[] = $this->rowset[$query_id];
         }

#
#-----[ AFTER, ADD ]------------------------------------------
#
         if($this->caching)
         {
            $this->write_cache();
         }

#
#-----[ FIND ]------------------------------------------
#
   function sql_freeresult($query_id = 0)
   {

#
#-----[ AFTER, ADD ]------------------------------------------
#
      if($query_id === 'cache')
      {
         $this->caching = false;
         $this->cached = false;
         $this->cache = array();
      }
      if($this->caching)
      {
         $this->write_cache();
      }

#
#-----[ FIND ]------------------------------------------
#
         mysql_free_result($query_id);

#
#-----[ REPLACE WITH ]------------------------------------------
#
         @mysql_free_result($query_id);

#
#-----[ FIND ]------------------------------------------
#
} // class sql_db

#
#-----[ BEFORE, ADD ]------------------------------------------
#
   function write_cache()
   {
      if(!$this->caching)
      {
         return;
      }
      global $phpbb_root_path;
      $f = fopen($phpbb_root_path . 'cache/sql_' . $this->caching . '.php', 'w');
      $data = var_export($this->cache, true);
      @fputs($f, '<?php $set = ' . $data . '; ?>');
      @fclose($f);
      @chmod($phpbb_root_path . 'cache/sql_' . $this->caching . '.php', 0777);
      $this->caching = false;
      $this->cached = false;
      $this->cache = array();
   }

   function clear_cache($prefix = '')
   {
      global $phpbb_root_path;
      $this->caching = false;
      $this->cached = false;
      $this->cache = array();
      $prefix = 'sql_' . $prefix;
      $prefix_len = strlen($prefix);
      $res = opendir($phpbb_root_path . 'cache');
      if($res)
      {
         while(($file = readdir($res)) !== false)
         {
            if(substr($file, 0, $prefix_len) === $prefix)
            {
               @unlink($phpbb_root_path . 'cache/' . $file);
            }
         }
      }
      @closedir($res);
   }

#
#-----[ OPEN ]------------------------------------------
#
admin/page_footer_admin.php

#
#-----[ FIND ]------------------------------------------
#
$db->sql_close();

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$db->clear_cache();

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Cached generation
//
$lang['debug_generation'] = 'Debug: page generation = %s seconds,';
$lang['sql_queries'] = 'sql queries = %s';

#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php

#
#-----[ FIND ]------------------------------------------
#
   'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);

#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// Cached Generation
//
$page_gen_time = sprintf('%.5f', microtime_float() - $GLOBALS['page_gen_start']);

#
#-----[ FIND ]------------------------------------------
#
$template->assign_vars(array(

#
#-----[ AFTER, ADD ]------------------------------------------
#
   // Cached Generation   
   'PAGE_GENERATION' => sprintf($lang['debug_generation'], $page_gen_time),
   'MYSQL_QUERIES' => sprintf($lang['sql_queries'], $db->num_queries),

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_footer.tpl

#
#-----[ FIND ]------------------------------------------
#
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>

#
#-----[ IN-LINE FIND ]------------------------------------------
#
{TRANSLATION_INFO}

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<br />{PAGE_GENERATION}&nbsp;{MYSQL_QUERIES}

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
User avatar
Wedgie
Site Admin
 
 
Posts: 51721
Joined: Thu Oct 27, 2005 8:00 am
Has liked: 2153 times
Been liked: 4093 times
Grassroots Team: Noarlunga

Postby magpie in the 80's » Sat Feb 17, 2007 3:30 pm

yep that will fix the problem wedgie :wink:

and it has. much quicker now
I went to a fight the other night, and a hockey game broke out. - Rodney Dangerfield (1921 - 2004)
User avatar
magpie in the 80's
Coach
 
 
Posts: 35437
Joined: Fri Apr 14, 2006 7:56 pm
Location: in the quiz books
Has liked: 1 time
Been liked: 24 times

Postby Ian » Sat Feb 17, 2007 4:40 pm

Heaps quicker now.
North Adelaide F C : Champions of Aust 1972 : Premiers 1900, 02, 05, 20, 30, 31, 49, 52, 60, 71, 72, 87, 91
User avatar
Ian
Moderator
 
 
Posts: 11443
Joined: Thu Oct 27, 2005 11:25 pm
Has liked: 312 times
Been liked: 93 times
Grassroots Team: Lockleys

Next

Board index   General Talk  General Discussion

Who is online

Users browsing this forum: No registered users and 15 guests

Around the place

Competitions   SANFL Official Site | Country Footy SA | Southern Football League | VFL Footy
Club Forums   Snouts Louts | The Roost | Redlegs Forum |

cron