Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

Faster more efficient [bug] BBCode extension

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> Site Suggestions
View previous topic :: View next topic  
Author Message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Wed Mar 12, 2008 9:32 am    Post subject: Faster more efficient [bug] BBCode extension Reply with quote

Lately I have been trying to resolve some performance problems with the bugzilla installation on gilgamesh, and I noticed that castleparadox's [bug] BBCode extension makes a request to bugzilla for each and every load of a post that contains a bug tag.

Although I don't think this is what is causing my own performance problems, I do think it is worth optimizing. I wrote a quick utility that runs on the gilgamesh server once an hour and updates http://gilgamesh.hamsterrepublic.com/bugzilla/buglist.txt

This buglist.txt is a tab-delimited text file with the bug number, bug resolution, and bug description for all bugs. requesting it should be signifigantly faster than doing a full query through bugzilla's cgi query interface. That means castleparadox threads that use the bug tag could load faster, and the overall load on gilgamesh's mysql server would be slightly lower.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inferior Minion
Metric Ruler



Joined: 03 Jan 2003
Posts: 741
Location: Santa Barbara, CA

PostPosted: Wed Mar 12, 2008 10:30 am    Post subject: Re: Faster more efficient [bug] BBCode extension Reply with quote

James Paige wrote:
Lately I have been trying to resolve some performance problems with the bugzilla installation on gilgamesh, and I noticed that castleparadox's [bug] BBCode extension makes a request to bugzilla for each and every load of a post that contains a bug tag.

Although I don't think this is what is causing my own performance problems, I do think it is worth optimizing. I wrote a quick utility that runs on the gilgamesh server once an hour and updates http://gilgamesh.hamsterrepublic.com/bugzilla/buglist.txt

This buglist.txt is a tab-delimited text file with the bug number, bug resolution, and bug description for all bugs. requesting it should be signifigantly faster than doing a full query through bugzilla's cgi query interface. That means castleparadox threads that use the bug tag could load faster, and the overall load on gilgamesh's mysql server would be slightly lower.


Done and done. Let me know if anyone sees strange output when using the bug bbcode tag. I tested multiple bug types and it seemed to work fine.

I can make this even more efficient by setting up a cron job to get the txt file locally every hour. That way CP is not making HTTP requests every time someone uses the tag. I'll set that up when I get home from work.

~IM
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Wed Mar 12, 2008 10:38 am    Post subject: Re: Faster more efficient [bug] BBCode extension Reply with quote

Inferior Minion wrote:

I can make this even more efficient by setting up a cron job to get the txt file locally every hour. That way CP is not making HTTP requests every time someone uses the tag. I'll set that up when I get home from work.

~IM


The file is generated once an hour at 10 minutes past the hour, so if you fetch it at 11 minutes past the hour (and if your server is synced with the NTP time network) you should get it with a minimum of lag-time.

I was pondering doing the same for wiki page titles, but I believe that wikimedia is more efficient than bugzilla, and the vastly larger number of wiki pages compared to bug pages probably means that the performance might actually be worse on my end.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Inferior Minion
Metric Ruler



Joined: 03 Jan 2003
Posts: 741
Location: Santa Barbara, CA

PostPosted: Wed Mar 12, 2008 11:53 am    Post subject: Re: Faster more efficient [bug] BBCode extension Reply with quote

James Paige wrote:
Inferior Minion wrote:

I can make this even more efficient by setting up a cron job to get the txt file locally every hour. That way CP is not making HTTP requests every time someone uses the tag. I'll set that up when I get home from work.

~IM


The file is generated once an hour at 10 minutes past the hour, so if you fetch it at 11 minutes past the hour (and if your server is synced with the NTP time network) you should get it with a minimum of lag-time.

I was pondering doing the same for wiki page titles, but I believe that wikimedia is more efficient than bugzilla, and the vastly larger number of wiki pages compared to bug pages probably means that the performance might actually be worse on my end.


Actually, all I do with the wiki code is ping gilgamesh to see if it's up. If I get a response, I use it, otherwise I set the url to hamsterrepublic.com. I do not query the specified pages in any way. Any text between the wiki tag is formatted such that it will be recognized by mediawiki as a proper page.

I don't think you're getting a performance hit from that.

~IM
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Wed Mar 12, 2008 1:16 pm    Post subject: Re: Faster more efficient [bug] BBCode extension Reply with quote

Inferior Minion wrote:

Actually, all I do with the wiki code is ping gilgamesh to see if it's up. If I get a response, I use it, otherwise I set the url to hamsterrepublic.com. I do not query the specified pages in any way. Any text between the wiki tag is formatted such that it will be recognized by mediawiki as a proper page.

I don't think you're getting a performance hit from that.

~IM


Ah, that sounds like an excellent way of doing it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3230
Location: Matakana

PostPosted: Thu Mar 13, 2008 8:32 pm    Post subject: Reply with quote

Actually, bug tags are acting up. Take for example Bug #610 and Bug #611
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Inferior Minion
Metric Ruler



Joined: 03 Jan 2003
Posts: 741
Location: Santa Barbara, CA

PostPosted: Fri Mar 14, 2008 12:29 am    Post subject: Reply with quote

The Mad Cacti wrote:
Actually, bug tags are acting up. Take for example Bug #610 and Bug #611


I think I've fixed it. Wasn't properly parsing handling the whitespace.

Thanks for pointing that out, TMC.
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Mon May 05, 2008 1:40 pm    Post subject: Reply with quote

I moved bugzilla to http://rpg.hamsterrepublic.com/bugzilla/

The old gilgamesh links still work, but you can avoid a layer of redirection by linking directly to the new URL.

Also, the plain-text buglist now exists at http://rpg.hamsterrepublic.com/bugzilla/buglist.txt although the old location should redirect to the new location (as long as you are fetching it with a method that supports http redirects)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> Site Suggestions All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group