python-fastjsonschema icon indicating copy to clipboard operation
python-fastjsonschema copied to clipboard

are the compiled validation functions cached?

Open renaud opened this issue 2 years ago • 1 comments

From the Python docs for re.compile():

Note The compiled versions of the most recent patterns passed to re.match(), 
re.search() or re.compile() are cached, so programs that use only a few regular 
expressions at a time needn’t worry about compiling regular expressions.

Is there such a mechanism in fastjsonschema?

renaud avatar Oct 26 '22 10:10 renaud

No, it is not in place. But it could be an interesting feature. Maybe in future. :-)

horejsek avatar Nov 07 '22 10:11 horejsek

Actually, I was wrong. Of course regexps are compiled.

horejsek avatar Jun 16 '24 17:06 horejsek