The TemplateMatcher class should be improved for efficiency. The parsing cache solution of LILAC should be used instead: https://github.com/logpai/LILAC/blob/main/benchmark/logparser/LILAC/parsing_cache.py