ModOrganizer2 / modorganizer

Mod manager for various PC games. Discord Server: https://discord.gg/ewUVAqyrQX if you would like to be more involved
http://www.nexusmods.com/skyrimspecialedition/mods/6194
GNU General Public License v3.0
2.06k stars 155 forks source link

Long Return Time after Exiting External Program on Archive Conflicts and older games #643

Open twizz0r opened 5 years ago

twizz0r commented 5 years ago

The problem:

After exiting an external program like xEdit, MatorSmash, Merge Plugins or Wrye Flash, MO2 repeatedly tries to close plugins.txt until it succeeds causing 45+ second waits for return to functionality.

To Reproduce:

  1. Run xEdit through MO2 and exit.

Environment:

Details:

If necessary, describe the problem you have been experiencing with more details and pictures.

Link to Mod Organizer logs:

USVFS:

https://gist.github.com/twizz0r/fe75ffeb15044ecbefa341b29ac2b2e5#file-usvfs-2019-02-01_20-07-19-log

MO Interface:

https://gist.github.com/twizz0r/fe75ffeb15044ecbefa341b29ac2b2e5#file-mo_interface-log

DefinitelyNotFred commented 5 years ago

I'm having the same issue. I first mentioned this on the Testers channel on the Discord (On Wednesday at 1:30 PM) but haven't been online recently to make any replies so I decided to come here and start a new topic but in the process found twizz0r's topic.

My wait times are closer to the 25 seconds mark. El Rizzo on Discord suspected it might be something to do with archive parsing, but I've checked and don't have that enabled. AL asked if MO2 stays locked in the time period I'm talking about. Well, the screenshot below is what it looks like for the entire time when it hangs up for me. Clicking things won't give me any response but hovering over plugins with the mouse will highlight them and bring up the tooltip like usual. Maybe that green loading bar at the bottom can give you a bit of a hint on where to start looking?

And to be clear, since it seemed like there was a bit of confusion about this on the Discord, this seems to happen for any executable run through MO2, not just FNVEdit.

mo2 executable hangup

Using MO2 2.2.alpha9 Operating system is Windows 10 Home

Al12rs commented 5 years ago

The fact that you are both modding FNV and there haven't been any other reports on this makes it pretty clear this must be an issue with the FNV Mo2 plugin.

Thank you both very much for reporting this with detailed info!

twizz0r commented 5 years ago

YW!

I'm glad DefinitelyNotFred put up that screen shot. Notice the time jump backward in the log windows on closing plugins.txt. Same for me. I just couldn't capture it.

I also have archive parsing disabled.

I also wonder if installed mod volume affects the wait. I have 460 mods and 121 active plugins. Maybe that's why my wait time is longer than DNF?

Tried FO3 with minimal LO and can't reproduce.

Al12rs commented 5 years ago

Can you guys confirm whether the plugin loadorder is compromised or not after running the external executable? I have a report with similar logs for Oldrim but the issue there seems to be that load order gets set to alphabetical instead of longer time to unlock.

twizz0r commented 5 years ago

Not happening here. LO stays the same. Wrye Flash can mess up LOs when it does its own redating but that's something that can be fixed inside of Wrye.

DefinitelyNotFred commented 5 years ago

How would I test whether my loadorder is compromised?

Also, mildly interesting fact: opening LOOT through MO2, pressing unlock, closing LOOT, and then refreshing the mod list in MO2 will cause two long wait periods: once after pressing unlock and second after refreshing the mod list. This happens even if nothing is actually rearranged by LOOT. When doing the same using xEdit or MergePlugins, it only seems to have that waiting period upon unlocking MO2 and not upon refreshing (but maybe that's just an issue of them being used in a way that doesn't touch as many plugins at once.)

twizz0r commented 5 years ago

Fun fact: external programs includes the game itself ;)

Al12rs commented 5 years ago

yeah this needs some looking into asap. I won't have time for this until after the 15th though

twizz0r commented 5 years ago

No worries. Everything (else) still works fine!

Al12rs commented 5 years ago

This seems to be limited to games that use filetime to determine loadorder

Al12rs commented 5 years ago

I have investigated and this seems to be caused by the new archive conflicts code, I put an extra condition to avoid completely the archive loading part instead of simply passing empty archives to the function.

That does not solve the issue that for older games getting the load order is much slower since it has to read the filetime from the files on disk, making archive conflicts incredibly slow when refreshing the modlist. This is because the plugins loadorder is parsed twice for each mod during a full refresh, to get the correct file priority of the files inside archives.

My change should fix the issue while not using archive conflicts.

twizz0r commented 5 years ago

Looks like this is fixed in the new build. tyvm!

Al12rs commented 5 years ago

It's fixed only if you don't use archive conflicts. We need to find a way to improve refresh performance there, mostly avoid having to get load order for each mod added

DefinitelyNotFred commented 5 years ago

The new build fixed it for me as well.