[wp-trac] [WordPress Trac] #17445: Give a speed kick to combined is_serialized() + is_serialized_string() + maybe_unserialize() usage

WordPress Trac wp-trac at lists.automattic.com
Sun May 15 14:13:18 UTC 2011


#17445: Give a speed kick to combined is_serialized() + is_serialized_string() +
maybe_unserialize() usage
--------------------------+-----------------------------
 Reporter:  hakre         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.2
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 In #17129 is_serialized_string() has been speed up by 23%. That was for
 the function itself.

 However, that function is used in contexts that make the call to
 is_serialized() directly or indirectly via maybe_unserialize().

 Most often these calls are redundant and must not be done at all.

 If preconditions are already met, is_serialized_string() can be replaced
 with a simple check for the 's' or 'S' format and maybe_unserialize() can
 be replaced with @unserialize($data) as that's the code executed in
 maybe_unserialize() when is_serialze() had returned true on $data;

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


More information about the wp-trac mailing list