ConnectSDK/Connect-SDK-Android — pull request #130 by jlai (2014-07-11 00:15:14+00:00)
Title: Improve performance of SSDP message parsing

Scanner uses regexes to split lines, which is pretty expensive CPU-wise. This patch explicitly splits on "\r\n" (which is required by the UPnP spec for HTTP-style headers) using indexOf instead.

Also, it uses the US-ASCII charset for decoding because SSDP packets shouldn't contain non-ASCII characters, and uses an ASCII-only toUpperCase replacement for speed.