Made the game load faster by not creating new instances of selectedNodes or selectedTriangles (array lists) and just reusing the same one. It still takes a few seconds at the start but afterwards it works fine