Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 119558

fireproofsocks on "[Plugin: Custom Content Type Manager] Custom field: image: select image takes tons of CPU"

$
0
0

Interestingly enough, those PHP warnings only occur when caching is turned on.

That makes total sense: when caching is on, PHP is trying to read the image into memory in order to render a smaller version of it. The names are generated via an md5() hash of the image attributes (e.g. name, size, etc) in order to ensure that the name of the cache file is unique.

If you've got broken URLs in your database, then that could cause long load times. If you think it's a database issue, then turn on your MySQL slow query log and see what trickles in. I've done a fair amount of tuning/profiling on the GetPostsQuery class to ensure its searches are reasonably fast (it's what's behind the lightbox queries), but some types of queries can be intensive, especially on large data sets. In a nutshell: WP doesn't scale well for certain situations. Depending on how your query is defined (e.g. if you're looking for images matching a certain taxonomy), then it's hard to have an efficient query given the WP database structure. Hard to say if that's what you're experiencing, but it's worth looking into. If you're on shared hosting, you'll start to blow out fuses with queries on large data sets no matter which system you use, so if that is in fact what's going on, then you need to be thinking more about more robust options for hosting.


Viewing all articles
Browse latest Browse all 119558

Trending Articles