MegaIng
MegaIng
For me it works without `()`, but yes. (probably python version differences)
@ornariece Can you provided the full project? It is not impossible to cache the parsing, but I would like to do profiling myself.
But also note that `cache=True` for the whole `lark` instance should be really fast either way.
Ok, I will try to provided a patch without the project for the moment.
> i've tried that before, without seeing any improvement nor cache file That on the other seems like a bug. The cache file will get stored in your `temp` folder....
@erezsh But only once. I would be surprised if that would be as slow as reading and parsing everything repeatedly. (And yes `open_from_package ` shouldn't matter)
@ornariece Can you try [this branch](https://github.com/MegaIng/lark/tree/load_files_once)? `pip install git+https://github.com/MegaIng/lark.git@load_files_once`
@ornariece That branch should also only parse each grammar once.
@ornariece Could you use some kind like this: ``` from functools import lru_cache from time import time def log_wrap(f): i = 0 def wraps(*args, **kwargs): nonlocal i i += 1...
@ornariece That is expected since not all call to `get_data` succeed (they throw `FileNotFound` errors.) Can you do a full on profile of the entire application and look at which...