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)
|
Posted: Wed Mar 12, 2008 9:32 am Post subject: Faster more efficient [bug] BBCode extension |
|
|
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 |
|
 |
Inferior Minion Metric Ruler

Joined: 03 Jan 2003 Posts: 741 Location: Santa Barbara, CA
|
Posted: Wed Mar 12, 2008 10:30 am Post subject: Re: Faster more efficient [bug] BBCode extension |
|
|
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 |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Wed Mar 12, 2008 10:38 am Post subject: Re: Faster more efficient [bug] BBCode extension |
|
|
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 |
|
 |
Inferior Minion Metric Ruler

Joined: 03 Jan 2003 Posts: 741 Location: Santa Barbara, CA
|
Posted: Wed Mar 12, 2008 11:53 am Post subject: Re: Faster more efficient [bug] BBCode extension |
|
|
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 |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Wed Mar 12, 2008 1:16 pm Post subject: Re: Faster more efficient [bug] BBCode extension |
|
|
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 |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
|
Back to top |
|
 |
Inferior Minion Metric Ruler

Joined: 03 Jan 2003 Posts: 741 Location: Santa Barbara, CA
|
Posted: Fri Mar 14, 2008 12:29 am Post subject: |
|
|
I think I've fixed it. Wasn't properly parsing handling the whitespace.
Thanks for pointing that out, TMC. _________________
|
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
|
Back to top |
|
 |
|