[wp-trac] [WordPress Trac] #14429: Faster is_serialized

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 17 15:57:34 UTC 2010


#14429: Faster is_serialized
--------------------------+-------------------------------------------------
 Reporter:  sambauers     |       Owner:                        
     Type:  enhancement   |      Status:  new                   
 Priority:  normal        |   Milestone:  3.1                   
Component:  Optimization  |     Version:  3.0                   
 Severity:  minor         |    Keywords:  has-patch dev-feedback
--------------------------+-------------------------------------------------

Comment(by hakre):

 Thanks for the detailed feedback and the additional measurements. I think
 sites can benefit from that, as is_serialized is somehow a weak point.

 for the false positives as in #9930 I've added some more info there, too.
 It's another regex that is checking for proper float/double php
 serializations, the bools are easy to check being 0 or 1, but I have not
 provided any feedback to that.

 I dunno if these false positives are a real bummer or not. It's somehow
 specific.

 As duck_ suggested to do the actual serialization as an additional check
 at the end, this implies to change the code where is_serialized() is
 actually used to have a profit from that. I don't see an easy way to do
 that. Probably making use of php exceptions is one way to do so, but this
 is not an option right now because of PHP 4 compability. And even if we
 switch to PHP 5.2 I think there is no coding practice how to deal with
 exceptions if not at all in the project to easily decide on this. So this
 is in the end a design issue which tackles some general decisions.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14429#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list