I'm not sure I chose the right forum, but here are the author modification "industrial" ...
I found a wasteful method of obtaining the difference tier in the "calculateRatioFor"

Source code

1
2
3
4
5
6

if (b.tier() < a.tier()  1) {
value = 2 * (a.tier()  b.tier());
}
if (b.tier()  3 > a.tier()) {
value = b.tier()  a.tier();
}

it can be rewritten as follows:

Source code

1
2
3
4
5
6
7

int tier = a.tier()  b.tier();
if (tier > 1) {
value = 2 * tier;
}
if ( tier < 3) {
value += tier;
}

This is small change and the load too small, but I hope the mod will be a little better...