v3.15 windows
Parts procurement is incredibly slow, especially for larger forces. See this thread:
https://sourceforge.net/p/mekhq/feature-requests/312/
I believe that part of the problem is all of the dice rolls. I tried setting it to automatic success, and it still rolls to determine part availability. I also tried setting the arrival time to 0 with a modifier of 0, and even though it does not show the dice rolls, I think that it's still making them. I could be wrong, but if this is what's slowing it down, perhaps by removing these rolls when set to automatic success and 0 delivery time, it might greatly speed things up.
I don't think it is the dice rolls. The program loops through your parts to check for existing stockpiles to be added to when you procure items. My guess is that you have a lot of parts and that is the source of the problem. Still it should not take that long. There were a couple of parts that were loading in new units from the units.cache in order to calculate stuff and that was slowing things down. I have fixed that and it may speed this up in the next release (0.3.17). I also put in a check on campaign loading that tries to stack similar parts because I noticed that a lot of the campaigns I have loaded up have a bunch of random parts that were not stacked properly originally. That should reduce the number of parts and thus speed up the looping. When that releases, please let me know if you are still experiencing these problems and if so provide a copy of your campaign file so I can test it out.
Thanks I will.
Any update on this bug report?
I've got the latest version (3.19) and it's taking 4+ minutes between adding parts. Doesn't matter whether you are adding one or buying in huge bulk.
Update: Even deleting parts takes forever and the same with adding parts from a parts file.
Update 2: The slow down doesn't occur until you actually get the parts. While still in the Procurement List, there is no slow down. Also, large numbers of parts (like 500 tons of LB 10X ammo) seem to be much worse for slowdown compared to an overall large number of parts. I am using GM mode to aquire and deliver the parts. What I've been doing is using a second instance of MekHQ to get the parts and Exporting them, then Importing them in.
Last edit: pfarland 2015-09-28
Update 3: Importing the parts seems to lesson the effect considerably. I broke down the parts into groups, Exported from one instance into another repeating until I had everything I needed.. Then exported the whole group and imported again into another instance. At this point there is no slowdown. The slowdown is directly affected by the amount of parts aquired separately and the number of those parts. When Imported it seems to treat the whole group as one part in regards to the slowdown effect.
Update 4: The issue has to do something with a Log. Removing all the parts from the original campaign, saving, restarting, and Importing the full parts list brings back the issue. Importing into a fresh instance of MekHQ is almost instantaneous and with no issues. Attached Part List
Campaign without parts, so you can see the loading issue and then the part aquisition issue.
Update 5: After playing around with MekHQ for awhile, the issue is the daily log. Editing the save file and erasing the Daily Log resolves the issue.
Yes, I was able to test this out and it is definitely the daily log which is quite large for the day in question. I haven't sorted it out yet, but Java does not like pass around the fairly large string variable that carries that daily log.