SkXMLParser::parse: Optimize memory-backed streams
Parsing XML in small chunks can hit some O(n^2) paths in libexpat
that can result in extremely slow JPEG loading. See root cause analysis
from Snild Dolkow (snild@sony.com) in the skia issue.
All XMP metadata sent to SkXMLParser is memory-backed.
Bug: b/295364874, skia:296854546
Change-Id: I802da43faa87d298157e36aa5e45ad01b1310455
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/745020
Commit-Queue: Christopher Cameron <ccameron@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
1 file changed