1 kwa Sep 21, 2005 02:49
3 edb Sep 21, 2005 05:02
I'm looking forward to giving this a shot when I can, but I've got too many digital irons in the proverbial fire right now and keep tripping over my own junk, but I gotta point something out here.
kwa wrote:
... /yourblog.php?optimizedb=1 ...
I saw that and I thought you were trying to optimize me! Since I don't do anything how's this gonna get me to do it bett... oh uh, never mind!
4 kwa Sep 21, 2005 05:12
EdB wrote:
kwa wrote:
... /yourblog.php?optimizedb=1 ...
I saw that and I thought you were trying to optimize me! Since I don't do anything how's this gonna get me to do it bett... oh uh, never mind!
Now you're optimizedb, you still do nothing, but you do it quicker! :lol:
5 kwa Sep 21, 2005 05:38
personman wrote:
1. Nice work making it an actual plugin rather than a hack. That's much easier for users to install.
I wondered how to make it a plug-in with the current versions of [url=http://blog.lesperlesduchat.com]b2evolution[/url] (0.9.1 and 0.9.0x) and found a not so bad way to implement this feature as a renderer plug-in. However, optimizing the database tables takes a while (about 10-15 seconds on my blogs) and stopping the display of the page just after the title of the first blog or in the middle of the linkblog (depending of your blog's layout) appears buggy, doesn't it? It would be fine to have a "page displayed" event or so in the next version of [url=http://b2evolution.net]b2evolution[/url].
But the main issue of the current [url=http://b2evolution.net]b2evolution[/url] version is there is no clean way to define plug-in's parameters. You have to change them in the source code. It is still possible to create a toolbar plug-ins, but accessing a global plug-in from post edition does not appear to be very straightforward...
personman wrote:
2. I added it to plugins.b2evolution.net. Let me know if you have any corrections to my post. Did you want me to link to the forum post or to your blog post? Is ralphy the right name for the author?
Thanks! I tried to submit the plug-in a couple of times, but I've got an error message from my browser... My right developer nickname is kwa and my code web page is [url=http://blog.lesperlesduchat.com/dev.php]My Own Little Development Blog[/url]. I've written a post dedicated to that plug-in: [url=http://blog.lesperlesduchat.com/dev.php/2005/09/21/b2evolution_database_optimizer_plug_in]b2evolution: Database Optimizer Plug-in[/url]. (Other parts of my site, [url=http://blog.lesperlesduchat.com]Les perles du chat[/url], aremainly sex-oriented. Even if there is no porn or anything porn-related, linking a plug-in with sex is probably not the best way to promote it ;))
You may leave the current link to this thread. It is probably more interesting for newcomers to read what the other users tell about a plug-in.
personman wrote:
3. If I were to use this plugin, I would probably set up a cronjob to do the repair once a day or something. If I wanted to use wget to hit the ?optimizedb=1 url, would I have to also include &user=username&pass=mypassword?
I'm afraid you're going to have to include your administrator connection parameters. However, take care: if you've got public stats (either [url=http://b2evolution.net]b2evolution[/url] stats, [url=http://www.mrunix.net/webalizer/]Webalizer[/url] or [url=http://awstats.sourceforge.net/]AwStats[/url]), your login and password will become publicly available, since appearing in your logs!
It is possible to remove the administrator check, but then, since optimizing your database takes a while, your server might become overloaded if somebody decides to hit your page too often with the optimizedb=1 parameter.
In fact, I should either create a new database table, either use the hitlog table as a log of the Database Optimizer Plug-in activity. The main problem is some people deactivated the hitlog table update. I'm going to think about. A new version might appear in a couple of days...
6 personman Sep 21, 2005 05:47
I fixed up the author name and link. And I fixed the Submit a Plugin page. I forgot to restore a file after my 0.9.1 upgrade. It's working now.
7 kwa Sep 21, 2005 05:53
personman wrote:
I fixed up the author name and link. And I fixed the Submit a Plugin page. I forgot to restore a file after my 0.9.1 upgrade. It's working now.
Perfect! :) I've updated my profile too, in order to avoid any confusion in the future.
8 edb Sep 21, 2005 06:01
I'm curious about your thoughts on not going with a toolbar plugin. I know it's a funky place to put it since it would look like a something to tweak your post with, but it would put the moment of optimization in the hands of the user rather than upon each time attempting to actually post something.
Another question I had is about the 1% chance between 1a and 5a. Is that GMT or server time or blog time? I think the ideal would be blog time since that sort of implies low traffic time, but knowing allows the savvy user to customize the start and end hours.
Something else, but I'm really just popping in as a break from the constant never ending always uphill battle otherwise known as the antispam list.
Oh yeah! It goes away from plugin level, but have you considered adding a field to the settings table called 'last_optimize_date' then use that value to limit the frequency of optimizing? For example a low-traffic blog might go 24 hours but a high traffic blog might choose 4 hours. That way you still trigger on posting, but also say "hey we did it 11.8 hours ago and this guy says wait 12". I'm doing an installation where I added a field to that table is what made me think of it, plus a duration cycle would be a blog-side setting.
Just some thoughts.
9 kwa Sep 21, 2005 06:30
EdB wrote:
I'm curious about your thoughts on not going with a toolbar plugin. I know it's a funky place to put it since it would look like a something to tweak your post with, but it would put the moment of optimization in the hands of the user rather than upon each time attempting to actually post something.
I'm going to think about creating a toolbar. In fact, I've already begun a toolbar plug-in to edit the plug-in's parameters, but that solution didn't look very clean to me... However, it's probably better to make possible parameters edition in any way.
Today, creating a fully functional plug-in looks like adding a clever hack... I definitively have to look at the Phoenix source code to see what plug-ins can really do.
EdB wrote:
Another question I had is about the 1% chance between 1a and 5a. Is that GMT or server time or blog time? I think the ideal would be blog time since that sort of implies low traffic time, but knowing allows the savvy user to customize the start and end hours.
It's blog time, because of the reason you talk about.
EdB wrote:
Something else, but I'm really just popping in as a break from the constant never ending always uphill battle otherwise known as the antispam list.
Oh yeah! It goes away from plugin level, but have you considered adding a field to the settings table called 'last_optimize_date' then use that value to limit the frequency of optimizing?
You know what? I haven't considered that, because... I've never noticed that table before you told about! :-/ It's probably the best way to define every parameter, including the plug-in parameters as well!
EdB wrote:
For example a low-traffic blog might go 24 hours but a high traffic blog might choose 4 hours. That way you still trigger on posting, but also say "hey we did it 11.8 hours ago and this guy says wait 12". I'm doing an installation where I added a field to that table is what made me think of it, plus a duration cycle would be a blog-side setting.
In fact, optimizing the table once a day as well as autoprunning obsolete hitlog table entries should be enough.
All the "clever" 1% chance between 1 and 5 AM to optimize the database was intended to make sure every blog (low and high traffic ones) is going to be optimized (at least) once a day. By setting a last_optimize_date and a optimize_at entries in the settings table, there is no more need to perform those checks. There is also no more need to force the update, since it would be performed once a day. The only way to not perform the optimization would be to not have any visitor for a whole day! But then, the tables would still optimized anyway!
EdB wrote:
Just some thoughts.
Thanks a lot, you noticed some excellent directions to investigate about.
10 buyforless Apr 30, 2006 03:24
clicked link to download
got empty source
is it gone???
11 kwa May 02, 2006 01:49
Sorry, I've forgotten to upload the ZIPped file after moving the site to another server. Here it is again, you can now the download [url=http://blog.lesperlesduchat.com/dev.php/2005/09/21/b2evolution_database_optimizer_plug_in]b2evolution: Database Optimizer Plug-in[/url].
12 blogger4832 Jul 23, 2006 00:25
I installed this, and I got a number of errors about the set_time_limit function on line 130. The error I saw in my logs was "Cannot set time limit in safe mode..."
What is this and how can it be fixed? Does the script still run and do its thing even with this error?
Each time the error occurs, it appears 12 times, if that makes any difference.
Also, has anyone had issues with this script and MySQL? I am on a dedicated server, and it seems that MySQL has shut down twice since I installed this script. I'm not sure if the script is a culprit, but I removed it to see if anything else happens.
13 village_idiot Jul 23, 2006 00:48
your host is running php in safe mode. I havent looked at kwa's script but i can hazard a guess it needs some changes to work in that environment.
14 gerri Mar 28, 2007 06:18
I would like to have this plug in but I've downloaded it from both spots in this thread and both archives appear to be corrupt.
15 gerri Jul 16, 2007 07:25
I still have been unable to locate a good copy of this plugin. I download it and the zip file is corrupt.
Does anyone happen to have a copy to share?
Thanks
1. Nice work making it an actual plugin rather than a hack. That's much easier for users to install.
2. I added it to plugins.b2evolution.net. Let me know if you have any corrections to my post. Did you want me to link to the forum post or to your blog post? Is ralphy the right name for the author?
3. If I were to use this plugin, I would probably set up a cronjob to do the repair once a day or something. If I wanted to use wget to hit the ?optimizedb=1 url, would I have to also include &user=username&pass=mypassword?
Great job!