Looking at the source for `read-xml`, it seems to be using `list->string` in several places. That is, it reads characters one-by-one and constructs a list by appending a character to the end of it, than calls `list->string` to produce the string. I suspect read-xml could be made faster by using `string-append` in these cases.
https://github.com/racket/racket/blob/master/racket/collects/xml/private/reader.rkt Alex. On Saturday, June 27, 2020 at 11:05:42 AM UTC+8 'John Clements' via users-redirect wrote: > I’m parsing a large-ish apple plist file, (18 megabytes), and I find that > the built-in xml parsing (read-xml) takes about five times as long as the > sxml version (11 seconds vs 2.4 seconds on my machine), and that the plist > parser is way longer, at 18 seconds. > > Would anyone object if I added a margin note to this effect to the xml > docs? > > John > > > > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/f079d5ff-27c0-43be-b0dd-f999e8ee561cn%40googlegroups.com.

