WP Tuner 0.9.6 Comment Thread
This release: is tested on latest WP version, and generalizes support for almost any kind of unusual query.
Please post your comments and questions below. I reserve the right to snip inappropriate commentary, flame wars and so forth.
If you are reporting a problem:
- Please set Debug Level to 1 and copy the wpTuner Diagnostics report here
- If a specific plugin or widget is misbehaving, please note which one (if you know)
reply and
paste link
August 25th, 2009 at 1:24 am
hey, can you make a changelog accessible please? maybe on the plugin’s page at wordpress.org?
reply and
paste link
August 25th, 2009 at 5:42 pm
Re: ovidiu (#1),
I’ll see what’s possible. It’s all automated by WordPress… I just check changes in to their system and it automagically publishes updated releases.
reply and
paste link
August 28th, 2009 at 8:29 am
Hi, when I add the action the_content to the wptuner.php file, the content of posts and pages isn’t shown anymore (only the title and comment links are shown, the “format_text entry-content” div is empty). I added this line to wptuner.php:
add_action(’the_content’, ‘wpTuneFilterTime’ );
Am I doing something wrong?
reply and
paste link
August 31st, 2009 at 4:27 pm
Re: Leon (#3),
That’s a tricky one, Leon. the_content() assumes the filter will process data passed into it, and return a new version of the data. Since my filter knows nothing about the_content, it returns nothing — and that’s what you get on the page.
Let me look around a bit and see if there is a general purpose way for me to set up the filter action so it automagically works with the_content and any other filters that make assumptions about what the filter does.
reply and
paste link
September 2nd, 2009 at 5:58 am
Re: Pete (#4), cool, thanks! I look forward to a the next version of WP Tuner
reply and
paste link
September 15th, 2009 at 1:02 am
Please help, Pete!
reply and
paste link
September 17th, 2009 at 3:20 am
hey Pete: found a problem in conjunction with the mailpress plugin:
`2009-09-17 08:52:40 000000 — PHP [E_NOTICE] 8 : Undefined index: class in /var/www/clients/client4/web18/web/wp-content/plugins/wptuner/wptunerdb232.php at line 86
2009-09-17 08:52:40 000000 — PHP [E_NOTICE] 8 : Undefined index: class in /var/www/clients/client4/web18/web/wp-content/plugins/wptuner/wptunerdb232.php at line 91
`
http://mailpress.org - care to have a look? the above error is in the log files of mailpress…
reply and
paste link
September 20th, 2009 at 8:44 am
Re: Redemptor (#6),
As the message says, please go to the WP Tuner admin page, and read the more detailed error message there. It should give a hint about the problem.
Usually, it is an issue with permission for writing the configuration files…either permission on the file, or on the folder.
reply and
paste link
September 20th, 2009 at 8:49 am
Re: ovidiu (#7),
Thanks!
Mailpress must be turning on a more detailed level of logging. I’ll clean this up; must have missed it earlier.
The good news: E_NOTICE messages don’t cause the program to run incorrectly.
reply and
paste link
October 4th, 2009 at 3:45 am
Hi,
WP Tuner causes conflict with DB Cache Reloaded plugin. It loads the wp-includes/wp-db.php file directly, whereas it should first try to include wp-includes/db.php file. Please use require_wp_db() function instead to include correct file (it is defined in wp-includes/functions.php file), or copy its body to your plugin.
reply and
paste link
October 4th, 2009 at 3:47 am
One correction - plugin should try to include wp-content/db.php file first, not wp-includes/db.php.
reply and
paste link
November 19th, 2009 at 11:03 am
Re: Pete (#4)
Pete, thanks for writing this plugin! Although your tip on removing unused plugins was what saved me seconds off my page load times!
the_content() only accepts and returns one parameter, which is $content. So you could just return $content at the end of your function. I believe most WP filters only accept one parameter, that parameter is just sometimes an array (like $post or $comment). Either way, you should be able to just pass it back at the end of your function.
The format of the function is: add_action( $tag, $function_to_add, $priority, $accepted_args );
So we can also specify that your function should be called before or after all other functions that get called to act on that $content by including a low $priority (10 is default, so anything lower than that would likely be first) or a high $priority (say, 90).
Now on to my question about improving performance… do you have any general guidelines as to what takes so much time in the “start” section? I’ve added your function in wp-settings.php to generate separate load times for each plugin. I ended up removing one plugin as a result, but I still get long load times on the mess of stuff between the beginning of wp-settings and when the first plugin is loaded. I’m guessing there probably isn’t much that can be done to speed up that core WP startup time without hacking wp-settings to try to remove stuff that I don’t think I need to use from core WP as of right now.
However, I know you’ve done a ton of research into this and would love to hear your opinion.
I also found another thread about performance in the WP forums and it mostly talks about slow page loads (especially slow WP admin pages) due to hangs on various things like curl, fopen, etc. http://wordpress.org/support/topic/224410. There is a hack to shut off some of that stuff, but don’t we need it!? For pingbacks, RSS, remote posting (XML-RPC), etc!?
reply and
paste link
November 19th, 2009 at 12:17 pm
Re: Tim Nicholson (#12)
Pate, do you have idea WHY removing unused plugins might help performance? I looked at the wp-settings.php file it reads the list of active plugins from the database. It doesn’t just loop through all the files in the plugin directory. So it really makes no sense, but it seems to work.
reply and
paste link
December 3rd, 2009 at 11:01 pm
looks like WPT expects wp-config.php to be where WP sticks it by default. maybe WPT could/should use the same method as WP for locating the config (which can be up a directory (or 2?)). ex: if WP is installed in root, then /home/user/www/wp-config.php is default, but i keep mine in home/user/wp-config.php for xtra security and would rather not have to move it to run WPT.
flowers and beer and peace
reply and
paste link
December 4th, 2009 at 11:23 am
Re: Tim Nicholson (#13),
The list of active plugins IS read from the DB, but there are some loops that look at all plugins. I’ve not taken time to analyze it completely. (If you are interested and have time, the easy way in Windows is: install System Internals’ FileMon, then run Wordpress on your local computer. You’ll soon see the issue.)
The main reasons for slow startup seem to be:
- too many plugins
- badly written plugins
- inefficient/wasteful DB access
- cross-site access
That last one IS needed sometimes, but certainly ought to be cached. I recently saw a system that did 20 accesses to eBay on every page load. At busy times of day it took 3 minutes to load the page! Pretty sick.
reply and
paste link
December 4th, 2009 at 11:26 am
Re: Daniel (#11),
Thanks, Daniel. I’ll look into that before the next release.
That’s some of the trickiest code in the system. wpTuner has to preempt the loading of database code, in order to properly instrument DB access. To be compatible with another DB plugin, I’m going to have to test that pretty carefully!
reply and
paste link
December 4th, 2009 at 11:27 am
Re: ZDN (#14),
Sorry about that. Support for up-level wp-content is (relatively) recent. I’ll see what I can do to fix that in the next release. AND, I’ll try to move the wpTuner startup code earlier in the load cycle. Might as well have it in index.php for that matter
reply and
paste link
December 4th, 2009 at 11:28 am
Folks, I want you to know I have not forgotten wpTuner.
Unfortunately, I’ve got to spend most of my time on other things right now (financial and other priorities), but I’ll get back to this.
reply and
paste link
December 6th, 2009 at 10:03 am
Re: Pete (#16),
I have just released DB Cache Reloaded 2.0 - it introduces Wrapper Mode. In this mode my plugin can work with WP Tuner at the same time. There is one problem only - WP Tuner incorrectly shows who executes query. I have posted a small fix for this on WP Forum.
reply and
paste link
December 6th, 2009 at 10:54 am
Hi Pete
I just tested your plugin on one of my site and it work great but some results are bit puzzling. Analysis states that slowest is start and almost 80% of loading time. Is it then a hosting problem? Another one is get_footer (around 10% of loading time). Any thought on that?
Thnx
reply and
paste link
December 18th, 2009 at 12:41 am
Hey Pete,
I love WP-Tuner, I mention it all the time when I to WordCamp talks, it blows everyone’s minds.
I know the CSS isn’t that important because its only admins that see it, but I think WPTuner could be styled in a way that made it feel cleaner and be easier to read through. I worked out a style that is similar to yours but with tweaked contrast and spacing for the tables. I hope you consider integrating it into WPTuner, I think a lot of people would appreciate it.
Here’s how it looks in the admin:
http://simianuprising.com/wp-content/uploads/2009/12/wptuner-cssmod-admin.png
Here’s how it looks with kubrick:
http://simianuprising.com/wp-content/uploads/2009/12/wptuner-cssmod-kubrick.png
I made a svn .diff of the changes to the css in wptunershow.php, you can find it here:
http://pastie.org/748351
And here is a paste of the entire wptunershow.php file with my css modifications:
http://pastie.org/748355
Thanks for your work on the plugin!
reply and
paste link
February 10th, 2010 at 6:49 am
k..i agree with you…but can you give us more details about this subject?…thanks