+1 for Rtree. if you want i can throw my version at you. (not that it is bug-free or neat to read)
i wouldn’t start off with tile-sort. it’s not always better than quadratic and always worse with “few” triangles.
it would suffer from the same OO-memory hazard issue tho’. yet, as Cas said, since your triangles are static, you might like to try to convert the object quad/oct/r -tree into a bytebuffer version. memory issue fixed, plus it’s directly useable by shaders.