Odie / skyui-vr

SkyUI interface mod for SkyrimVR
MIT License
160 stars 27 forks source link

Deal with really large inventories #27

Open Odie opened 5 years ago

Odie commented 5 years ago

SkyUI seems to process all the items in the inventory when the inventory or container menu is opened. This is fine when there are relatively few items. But as the number of items in the inventory grow, a delay starts to become apparent when the inventory menu is opened. This shows up as a slight pause in rendering, which translates to player disorientation and nausea.

This issue might be preventable if we can split the processing over a number of frames. This will cause items in the inventory list to shift around as data is loaded and placed into their proper sort order. This should be much more pleasant than being disorientated, however.

bstsmt commented 5 years ago

I have pulled my SkyUI-VR for this same issue. Opening the SkyUI (for me) has approx 3-5 second pause or load. This happens every time. This also happens on every open/search routine whether it be searching a body, satchel or container to see the contents. I just opted to hit the take all. The massive obstacle (and the only reason for removing SkyUI-VR, well, I have waited up to 30 minutes for it to finish, but it did not. I've repeated two additional times and each attempt's results were the same. I am back to the Skyrim original inventory control hoping that this will be resolved.

Odie commented 5 years ago

Hi there!

From what you described, one thing might want to check is to make sure to install the .pex files that comes with skse. Give that a shot and see if that solves your issue.

Opening your inventory can start to be slow when you start to have large number of items, though. The one example I’ve seen was on a save file with well over 1000 items, IIRC. Though the delay was more like a 0.3-0.5 second pause than a 30 minutes pause like you’re describing.

stormingm commented 3 years ago

I had this same problem where it would take 3 to 5 seconds to load after opening up my inventory or any inventory. I tried to reduce my item count but that did not have an effect. I then went into vortex (my mod manager) and saw that I had not activated the SkyUI_SE.esp file for the mod. Once I activated the .esp the inventory loading pause was gone. So a quick check if you have the same issue.

Odie commented 3 years ago

Tried investigating a bit on this issue.

For largish containers, each time you take or put something into the container, there is a noticeable delay where the game seem to stop rendering/responding altogether. I'm a bit of a packrat and it's not unusual to see a 2~3 second delay. This makes all the inventory management so much more painful.

After dropping in a bunch of printfs, it appears that skyui might not be the culprit. When you click to retrieve/store, SkyUI calls into the game engine with this:

https://github.com/Odie/skyui-vr/blob/198a00a19bec4fee13617960110bbeec1f3403f8/src/ItemMenus/ItemMenu.as#L401-L404

It looks like, the next thing that happens the game engine calling back into SkyUI saying the inventory list has been updated:

https://github.com/Odie/skyui-vr/blob/198a00a19bec4fee13617960110bbeec1f3403f8/src/ItemMenus/InventoryLists.as#L129 https://github.com/Odie/skyui-vr/blob/198a00a19bec4fee13617960110bbeec1f3403f8/src/ItemMenus/InventoryLists.as#L376-L380

There is a large time delay between these two things happening. What I mean is, SkyUI doesn't appear to have any control over what is happening. I'm not entirely sure though. The SkyUI source code is still a bit of a maze to me.