pomo/streams.php str_split() suggestion ?
|Reported by:||mrasnika||Owned by:|
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:
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 ?
Change History (5)
- Summary changed from pomo/streams.php suggestion ? to pomo/streams.php str_split() suggestion ?