Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid slow regex_meet in _joinString
There are already some places where the calling code takes care of avoiding `.*` and just use `None`. However, this was not done in `_joinString` and was producing a trivial `.{0,}` causing slow calls to `regex_meet`. A sample schema that is made faster by this change is: ``` { 'anyOf': [ { 'title': 'MyEnum', 'enum': [ 'aaaaaaaaaa', 'bbbbbbbbbb', 'cccccccccc', 'dddddddddd', 'eeeeeeeeee', 'ffffffffff', 'gggggggggg', 'hhhhhhhhhh', 'iiiiiiiiii', 'kkkkkkkkkk' ] }, {'type': 'string'} ] } ``` Which takes ~6sec to be compared with itself with `isSubset` before this change and ~0.05sec after the change.
- Loading branch information