You can get detailed performance per function call with this snippet. Edit the lark main and add the setup to the beginning and the result printing to the bottom. Optimally, lark could have a command line option which activates this on its main.
import sys
import io
import pstats
import cProfile
profiller = cProfile.Profile()