ornariece

Results 17 comments of ornariece

i have 46 grammar files, some of which don't use ``common.lark``. > lark should not do more than one import of `common.lark` per grammar file. do you mean the ``common.lark``...

i get that (i used to merge transformers manually before ``merge_transformers`` existed, so i'm familiar with the whole naming of imported rules). what i'm questioning is not the parsing of...

> You can add a simple print/timing statement in `Lark.__init__` near line 300 after `load_grammar`. At that point all file excess (except cache) has been done. how will that help...

i just measured. in my case, the part after it takes less time in each calling of ``Lark.__init__``. notably, for the calling that takes the most time out of all,...

ah yes i was using 3.7. well, no notable difference noticed... so it's mostly parsing time. well i guess if i want to avoid that i should limit my use...

> > @ornariece Can you provided the full project? It is not impossible to cache the parsing, but I would like to do profiling myself. i can't do that, unless...

> > > But also note that `cache=True` for the whole `lark` instance should be really fast either way. i've tried that before, without seeing any improvement nor cache file

that creates the file alright, but i can't notice any measurable improvement. (i'm using ``open_from_package`` to create the parser, maybe that matters, although from what i've seen it shouldn't)

no noticeable change still. i checked that the change you made in ``load_grammar`` is indeed reached, and it is. so yea, i think we can be pretty certain now that...