[wp-hackers] wordpress optimizations
denis at semiologic.com
denis at semiologic.com
Sat Apr 16 20:43:10 GMT 2005
Quoting Mike Little <journalized at gmail.com>:
> On 4/16/05, Peak Discharge <chmoka at gmail.com> wrote:
> > I am also rather curious, why does query count on index increase
> > proportionally to the number of posts on index? for example if you install
> a
> > fresh wp 1.5 installation and make posts one by one you'll notice
> > considerable query count increase. How come?
> >
I had a similar problem because of plugins interacting with get_permalink
functions and related. It is mostly solved in 1.5.1, I think: my recent plugins
only do two queries at most now, thanks to the caching.
There are other issues, though. Namely:
http://www.semiologic.com/cats/blog/?debug=1
is hardly optimal. It calls:
/* sem_sp_cats */ SELECT DISTINCT categories.*, COUNT( post_id ) > 0 AS
has_posts FROM wp_categories AS categories ...
the above via my theme because:
SELECT * FROM wp_categories
is called after the 'init' rather than before, and doesn't tell if cats are
non-empty.
I've no clue where these come from:
SELECT cat_ID FROM wp_categories WHERE category_nicename = 'blog'
SELECT cat_name FROM wp_categories WHERE category_nicename = 'blog' x3
I think BA stats is responsible for one of the calls. The other four come from
WordPress. I dare add I am not listing a tree of categories.
As for why WordPress is querying for users, options, meta, comment counts, etc.,
or why the page needs > 0.4 seconds to be generated, I remain speechless --
Markdown and my resource hungry smart link plugin are neither called here.
--
Denis
http://www.semiologic.com
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the wp-hackers
mailing list