-
-
Notifications
You must be signed in to change notification settings - Fork 921
Closed
Labels
Milestone
Description
The method XML::RelaxNG.read_memory
is intended to be a factory method for creating a new schema from the string contents of the schema file.
But ... this is exactly what XML::Schema.new
does. And under the hood, libxml2 is still calling the same parsing code, so I would be surprised if it was any faster.
This duplication introduces debt to the codebase because it's another path we need to test (note: we're not doing a good job of this already), and the fact that we've begun to have to add workarounds for libxml2 misbehavior (see #1985) and it's not clear if we need to add it to both code paths or what.
Anyway, here's what I want:
- benchmark the two paths, make sure there isn't a performance reason to keep
read_memory
around - remove read_memory and make it an alias for
XML::Schema.new