Replace the sorting of railcraft modules with topological sort
liach opened this issue ยท 5 comments
The current sorting mechanism is a funky one. A toposort is easy to write and helpful for fast sorting of modules (like how forge sort mods) Just a reminder. If someone wants to write one, it's welcome, too.
It's not "funky", its just a depth first search topological algorithm.
https://en.wikipedia.org/wiki/Topological_sorting#Depth-first_search
Never said it was efficient, just that it wasn't funky or unusual. =P
Are annotations actually that slow?
The issue is the construction of load order that is inefficient.
contains
methods at O(n)
, which is somewhat a big hit.