[wp-hackers] SELECT DISTINCT .... ORDER BY not working....

Jacob wordpress at santosj.name
Wed Nov 21 07:07:51 GMT 2007


Computer Guru wrote:
> It's been a while since I did C++ (all C# for me now!), but I used to be
> quite good.
>
> But it's not necessary - that's my problem.
>
> Take a look at my homepage: http://neosmart.net/blog/
> It loads in either .1something or .0003something seconds. First is when the
> XCache is clear, second is when the cache is available.
>
> Basically, I rewrote my homepage from scratch (it doesn't use any WordPress
> functions, objects, libraries, etc. just the database) and it performs
> GREAT.
>   
Well, as robust as WordPress is, I would have to say that it is one of 
the trade offs for WordPress being as easy and as powerful as it is. Not 
to mention the large areas of legacy code that probably isn't pretty or 
optimized as well as it could be. Perhaps a grassroots movement could be 
formed to seek out those areas and do something about them. I'm not an 
optimization expert, so I can't really help with such a movement.

If you switched the library over to Zend Framework or CakePHP, you'll 
have similar problems, since you gain the overhead of those frameworks 
and inherit their bottlenecks. Their benefits, much like the WordPress 
library far outweigh the bloat that is taken on.

Like those frameworks, the WordPress bootstrap includes the entire 
library, which for most users means that it must be compiled and then 
executed for each request (except for those users lucky like you that 
have APC or XCache). There is no easy solution, well actually that is 
wrong. The easy solution is output caching, which might be best for most 
people who run a blog whose content does not change often.

To get back on topic, I think that since support MySQL 3.x is dropped, 
the queries can be much more optimized with MySQL 4.0 features. Not 
doing so to support other DBMS does not matter, since WordPress allows 
for complete replacement of mysql. Since the method would require 
replacing queries, it is possible that the replacement won't be that fast.

To summarize:

You either have a solution which gives you have exactly what you want, 
but requires a lot of manual editing without a lot of features or you 
have a lot of features which gives you a wide range of choices, but is 
"bloated".

-- 

Jacob Santos

http://www.santosj.name - blog
http://wordpress.svn.dragonu.net/unittest/ - unofficial WP unit test suite.

Also known as darkdragon and santosj on WP trac.



More information about the wp-hackers mailing list