Closed xor2003 closed 3 years ago
How long does it take to load from cache? The slowest part AFAIK is generating LR table, which gets cached and reused. I haven't worked with grammars that are slow in other parts of the construction process. Have you tried to do deepcopy?
After I used Singletone it doesn't bother me anymore
When I do deepcopy it cannot deepcopy Grammar. It is some issue with recursion and python crashing. It works for me when I do simple copy().
Description
I have big grammar 28k. pgt file is 9MB. There are actions and recognizers in python.
So creation of Gramar and Parser from pgt file takes time. But I want unit tests to pass fast. So I want to create Gramar, Parser objects just once (or some prototyping) and to have actions, orginizers to be from different objects (;same class; store different context data) Can I deepcopy Parser, Gramar?
Can you advice something?