[wp-trac] [WordPress Trac] #16794: pomo/streams.php suggestion ?

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 7 23:44:03 UTC 2011


#16794: pomo/streams.php suggestion ?
-------------------------+-----------------------------
 Reporter:  mrasnika     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  3.1
 Severity:  minor        |   Keywords:
-------------------------+-----------------------------
 Hi, just passing along an idea that was suggested to me:  we have a log
 which crashes with this --

 ''Fatal error: Out of memory (allocated 23855104) (tried to allocate 9
 bytes) in /var/www/html/wp-includes/pomo/streams.php on line 86''

 If you look at that line:

 http://core.trac.wordpress.org/browser/tags/3.1/wp-
 includes/pomo/streams.php#L86

 you will see that it is a simple str_split(). How about if the $string
 argument is passed by reference ? The problem as it is explained to me is
 that right now the $string argument is passed by value, e.g. it is copied,
 so if this is a large string, it is going to take double space when it is
 used as an argument; instead if it is used as an argument passed by
 reference it will not take any extra space at all.

 What do you think, would this help POMO_Reader::str_split() work with
 large strings ?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16794>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list