[wp-trac] [WordPress Trac] #30430: WP_Object_Cache does not properly cache objects nested in arrays

WordPress Trac noreply at wordpress.org
Fri Mar 6 15:42:19 UTC 2015


#30430: WP_Object_Cache does not properly cache objects nested in arrays
-------------------------------------------------+-------------------------
 Reporter:  jamesgol                             |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Cache API                            |  Review
 Severity:  normal                               |     Version:  2.0
 Keywords:  reporter-feedback has-patch needs-   |  Resolution:
  testing needs-unit-tests                       |     Focuses:
-------------------------------------------------+-------------------------

Comment (by jamesgol):

 Replying to [comment:9 jipmoors]:
 > Could you explain how that would be more efficient? The opcode of the
 function would be reduced by removing the duplicate functionality.
 >
 > The suggested benefit would be neglegable and the readability is greatly
 improved by not repeating the code, in my opinion.

 It is more efficient because it reduces the amount of code called. In the
 best case it is negligible (less than .1% more efficient) but in the more
 complicated cases when this is actually needed for it is 1-2.9% more
 efficient (depending on the type of data).

 This can potentially be called very frequently, I'm of the opinion that if
 you are going to slow something down you should minimize that as much as
 possible. I don't really care what version would be used as long as it
 goes in, this issue is going to be hit more and more as people are
 building more complicated apps.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30430#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list