Currently, auto-completion is effectively a brute-force search, which can become quite expensive. Should explore whether search-based approaches such as https://www.sciencedirect.com/science/article/pii/S0164121214001484 or work from sub-graph matching (e.g., https://github.com/ciaranm/glasgow-subgraph-solver) can help improve this.