Admiral level fetching is kinda hacky right now. I wonder if it might be better to just grab all the relevant port files from the first sortie to the last one, and then just take the first and last values, and do a binary search if those are different. The slow part is db access, so getting all at once shouldn't be problematic?
[x] Make sure the initial idea is okay
[x] Update the other exports
Short explanation:
There are multiple data exports, but they all work exactly the same.
The first ShellingBattle is a wrapper that's meant to make it simpler to use from the outside, so you basically just do DataExportHelper.ShellingBattle(...). I was thinking of removing this wrapper, but I think it's better to have it.
The second ShellingBattle is basically just a mapper from SortieDetailViewModel to ShellingBattleExportModel. The export models then get converted to CSV.
The ProcessData function...
The first parameter is a function with the signature that the second ShellingBattle has. This is needed so that those functions only need to do the actual data processing without worrying about loading data, incrementing the progress counters etc.
Admiral level fetching is kinda hacky right now. I wonder if it might be better to just grab all the relevant port files from the first sortie to the last one, and then just take the first and last values, and do a binary search if those are different. The slow part is db access, so getting all at once shouldn't be problematic?
Short explanation: There are multiple data exports, but they all work exactly the same.
The first
ShellingBattle
is a wrapper that's meant to make it simpler to use from the outside, so you basically just doDataExportHelper.ShellingBattle(...)
. I was thinking of removing this wrapper, but I think it's better to have it.The second
ShellingBattle
is basically just a mapper fromSortieDetailViewModel
toShellingBattleExportModel
. The export models then get converted to CSV.The
ProcessData
function... The first parameter is a function with the signature that the secondShellingBattle
has. This is needed so that those functions only need to do the actual data processing without worrying about loading data, incrementing the progress counters etc.