tuscanicz / BeSimpleSoap

A largely refactored BeSimple/Soap library used to build SOAP and WSDL based web services. This fork fixes a lot of errors and provides better API, robust, stable and modern codebase. The Api differs so much, that it won't be merged into original repository. If you find an error, please, report an issue here.
8 stars 7 forks source link

BeSimple\SoapCommon\Mime\Parser is painfully slow #2

Open tuscanicz opened 7 years ago

tuscanicz commented 7 years ago

Adding extra 1 second to the SWA request handling on localhost (MacOS X with PHP 7.x installed locally). Using Docker, situation goes a bit worse.

tuscanicz commented 7 years ago

The original BeSimple/Soap is also slow and present a wrong algorithm.

I suggest to rewrite the message parser completely. Instead of exploding the response/request message by line endings, I would parse it by the mime boundaries first, then the part headers by empty space. The part headers must be parsed by iconv_mime_decode while the content will be untouched. Simple.