[wp-trac] Re: [WordPress Trac] #7207: Optimizations for atom_enclosures and rss_enclosures

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 30 01:23:56 GMT 2008


#7207: Optimizations for atom_enclosures and rss_enclosures
--------------------------+-------------------------------------------------
 Reporter:  jacobsantos   |        Owner:  anonymous
     Type:  defect        |       Status:  new      
 Priority:  low           |    Milestone:  2.7      
Component:  Optimization  |      Version:  2.5.1    
 Severity:  minor         |   Resolution:           
 Keywords:                |  
--------------------------+-------------------------------------------------
Comment (by jacobsantos):

 I believe the reason {{{get_post_custom()}}} is that it already uses the
 global ID for the Loop. Using either one will be the same speed, but using
 your method, DD32, will use less memory as all of the metadata will need
 to be copied to the {{{$metadata}}} variable, whereas only the metadata
 that is needed is copied to {{{$encs}}}.

 It is almost a moot point, since both functions pull from the metadata
 cache will get all of the metadata. The copy made in the function will be
 destroyed when the functions go out of scope however, so in the long run
 using {{{get_post_meta()}}} will be more memory efficient.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7207#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list