[wp-trac] [WordPress Trac] #35394: Memory usage increases for each call to wp_insert_post in 4.X

WordPress Trac noreply at wordpress.org
Mon Jan 11 04:30:24 UTC 2016


#35394: Memory usage increases for each call to wp_insert_post in 4.X
-------------------------------+-----------------------------
 Reporter:  winfieldco         |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  4.4.1
 Severity:  normal             |   Keywords:
  Focuses:                     |
-------------------------------+-----------------------------
 I've installed 4.4.1 and 3.7.

 When I run a simple loop to that runs wp_insert_post,

 The memory usage increases as the loop progresses in 4.4.1, whereas in 3.7
 it stays the same.

 This eventually leads to an out of memory error in 4.4.1. I believe this
 is a regression introduced in the 4.X version as it has always worked
 before.

 To see this just add on each loop:

 echo memory_get_usage()/1024.0 . " kb \n";

 If you need to me write up some test code you can just add quickly to
 verify let me know. I will take a look through the wp_insert_code as well
 to see if I can find where the issue is myself. I've also tried the
 wp_suspend_cache_addition(true); as well as define( 'SAVEQUERIES', false
 ); But those do not effect the memory consumption. In any case, it still
 works fine in 3.X so I assume something changed.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35394>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list