[wp-trac] [WordPress Trac] #10521: Schema error breaks XMLRPC image uploading

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 25 18:03:39 UTC 2009


#10521: Schema error breaks XMLRPC image uploading
--------------------------+-------------------------------------------------
 Reporter:  Otto42        |       Owner:  josephscott 
     Type:  defect (bug)  |      Status:  new         
 Priority:  high          |   Milestone:  Unassigned  
Component:  XML-RPC       |     Version:  2.8         
 Severity:  major         |    Keywords:  dev-feedback
--------------------------+-------------------------------------------------

Comment(by brianlayman):

 I decided to get some actual numbers from 10 of b5's blogs to see how many
 string compares attach_uploads() would have to do with the current patch
 via: "SELECT count(*) FROM `wp_#_posts` WHERE post_parent = '0' AND
 post_type = 'attachment'"

 The counts I came up with were 6758, 5027, 671, 1200, 3684, 4377, 3095,
 21776, 15885, & 9846.

 It looks like many of our individual entertainment blogs will be up in the
 5k-10k range. So looping through ALL of those records, for every new
 attachment when publishing a 5 attachment post, would probably produce
 noticeable lag.

 Heck, for that one blog it would mean 65,328 if statements before the loop
 was exited, for just one attachment.

 Plus it would be better if we didn't make our db throw around that many
 records around the network when we know the overwhelming majority don't
 match. If we must keep this index unsigned, we could consider throwing an
 index on the quid column and allowing the comparison with $post_content to
 occur there.  I'd have to do some testing to see which method would be
 more costly.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10521#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list