Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: When casting a SimpleXML element to boolean, we're only concerned with the object having an XML node, *or* having attributes. Building attributes is done by sxe_get_prop_hash that also recursively builds the entire element tree starting from that element. We shortcircuit when the object has a valid XML node to prevent excessive amount of object creation when all your program is doing is loading XML strings and doing read/toBool operations. Before: http://i.imgur.com/TFFj97u.gif After: http://i.imgur.com/3kNpwIM.gif Closes facebook#2855 Reviewed By: @scannell Differential Revision: D1364022 Pulled By: @JoelMarcey
- Loading branch information