You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently JMS Serializer has some issues when handling large XML datasets. However, SimpleXML or rather libxml2, to be precise, allows to specify parameters to simplexml_load_string and related methods that influence libxml's handling of incoming XML.
Among the available ones LIBXML_COMPACT (trying harder to allocate memory more efficiently) and LIBXML_PARSEHUGE (bypassing some hardcoded limitations inside libxml) are interesting when deserializing large XML bodies. As the invocation of simplexml_load_string is hardcoded in the XmlDeserializationVisitor that class needs to be overridden if one wants to change its parameters.
Thus, I propose to provide a configuration interface that allows to control the configuration of libxml for use in JMS Serializer, i.e. in \JMS\Serializer\XmlDeserializationVisitor::prepare
Steps required to reproduce the problem
Deserialize a large XML body with JMS Serializer
Expected Result
Deserialized object structure
Actual Result
Exception parser error : internal error: Huge input lookup which goes away if one modifies said invocation of simplexml_load_string into:
Currently JMS Serializer has some issues when handling large XML datasets. However, SimpleXML or rather libxml2, to be precise, allows to specify parameters to
simplexml_load_string
and related methods that influence libxml's handling of incoming XML.Among the available ones
LIBXML_COMPACT
(trying harder to allocate memory more efficiently) andLIBXML_PARSEHUGE
(bypassing some hardcoded limitations inside libxml) are interesting when deserializing large XML bodies. As the invocation ofsimplexml_load_string
is hardcoded in theXmlDeserializationVisitor
that class needs to be overridden if one wants to change its parameters.Thus, I propose to provide a configuration interface that allows to control the configuration of libxml for use in JMS Serializer, i.e. in
\JMS\Serializer\XmlDeserializationVisitor::prepare
Steps required to reproduce the problem
Expected Result
Actual Result
parser error : internal error: Huge input lookup
which goes away if one modifies said invocation ofsimplexml_load_string
into:The text was updated successfully, but these errors were encountered: