ORIGINAL: Incy
I think large bag size is not a problem, I think it's an advantage. The larger the bag, the more you earn by only computing the edge (and not every possible path within the bag).
The america, siberia and africa bags would normally not change much during a game, most of the edge would remain static. The west and east edges of siberia, and the north edge of africa would see some adjustments, but for the main part they'd simply hug coast/boarder along the same path the entire game. Delta calculation of edges would not be very difficult to implement either.
The biggest gain would be that you never have to recalculate supply for anything outside of a bag.
You'd also never have to recalculate unlimited OOS status for any unit (which is probably an expensive calculation, that might have to be repeated very often, depending on your algorithm). All that is needed if you implement bags is to toggle a units 'unlimted OOS status' whenever it passes over the edge, or the egde passes over it.
I agree that it wil be somewhat complex to code (probably many days), so if you are able to solve well both
-unlimited OOS calculations
-calculating when units are brough back in supply
then you definately shouldn't consider this idea.
PS: You can eliminate the need for bags 'per minor' by calculating one bag that everyone on a side can use, and then add sub-bags for those parts only acsessible by some countries on a side. If/when the need arises I'll be happy to write out a more detailed algoritm for this.
I think there are too many intricacies in the supply rules for this to work. Here are a couple of the anomalies that supply has to deal with:
AOI unit - has 3 home countries.
Ski units - can ignore enemy zones of control.
Weather - changes the number of basic path hexes in a supply line (so the bags would have to be recalculated every time the weather changes); it also affects whether a port is iced in or not.
Optional rules - change how supply is calculated through sea areas.
Control of a sea area - affects supply through a straits hex.
Control of a city - has to be continuous for the entire turn for it to be a supply source
HQs can becomes primary supply sources - for a turn or for an impulse depending on optional rules
DOWs - affect which countries cooperate, which affects supply dramatically
Tertiary supply source - (secondary that can not trace to a primary but can trace to a secondary that is in supply) have to be determined within a'while' loop (or recursively, if you prefer).
That list is just off the top of my head, there are probably several more that I don't remember at the moment.
Whenever supply needs to be determined (which is continuously during land movment), the supply determination system hads to accommodate all those quirky rules. Add to the top of that Internet play, when multiple players on a side can be moving units simulataneously and affecting supply for both enemy and friendly units.
===
There's a good reason that the the new supply routines are 2650 + 1750 + 2350 + 975 = 7725 lines of code. And I haven't completed them yet. Somewhere around 9,000 to 10,000 lines of code is a likely final number. The basic algorithm isn't that hard to code, but all the odd bits take a lot of checking.