Forums » Bugs

Looking at Inventory While Mining

Mar 02, 2010 Surbius link
My issue is with how the inventory is refreshed and what mining ore does to it. It can take around 10 seconds for me to load my Inventory screen on occasion, other times it will load rather rapidly in 3 seconds or less. However if the Inventory loads slowly and if I'm mining ore at the same time, it will freeze the entire game and wont unfreeze until the ship stops mining ore and loses connection to the server.
Mar 02, 2010 raybondo link
What would you rather have it do? Not update? Only update when the screen is opened? Why do you have the inventory screen open? Would you get the same info if you had the ship cargo screen open instead? I believe that screen updates more quickly.
Mar 02, 2010 PaKettle link
The problem is when you get a crate of ore the inventory screen reloads itself. I assume the crate causes a refresh and it gets applied to the inventory screen because the inventory has changed. I do agree that it can be a pain even with my modest inventory. The combination of mining data being exchanged and the server sending the new inventory may simply be causing a time out with a large enough inventory.

The cargo screen is fine as the data set (ship inventory) is rather small.

Simply supressing the updates might be difficult. You may have to keep a copy of the current inventory and freeze it while in space or while players are in that screen.
Mar 02, 2010 raybondo link
Yeah, that's exactly how it works. The screen could be made to not update if it is visible and flag itself to update the next time it is made visible, I suppose. But I agree that it isn't the most optimized code.
Mar 03, 2010 davejohn link
Opening the inventory while mining locks my comp up too.

Would a simple fix be to add a bit of code that stops the mining beams if the inventory button is clicked ?
Mar 03, 2010 PaKettle link
simple yes. desirable - NO.
Mar 03, 2010 yodaofborg link
Eh, I've always said the Inventory page should only update for the system you are in, maybe even only the sector you are in, theres no reason for it to reload it all, as theres no way you can change the Inventory at another location. Same with sector/system jumps.
Mar 03, 2010 PaKettle link
Very true yoda - what I think it should do is have the player client store a copy of the inventory (at login?) and only update the sector your currently in only when the list is actually opened.
Mar 03, 2010 look... no hands link
yea come to think of it, it did that to me a year or two back when i was using a quad free beam hornet to boil rocks.

other than unhelpfully saying fix it, I've got no real suggestion on how to make it work better.
Mar 04, 2010 raybondo link
The problem is updating the tree control. That's what is slow. The client already has all the info it needs. The control basically completely refreshes itself instead of trying to find where the new item would be inserted and then inserted.

Become a member of PCC and you can gain access to the entire client UI lua so you can see exactly how it works. You'll even be able to change it to try different techniques and see which works out the best.
Mar 04, 2010 diqrtvpe link
Would it be sufficient to restrict the update to just the Local Inventory when you're not in a station and your inventory changes? You'll never have too much stuff in your ship to update quickly, and nothing else will change. I'm not yet sure how easy it will be to keep the Local Inventory tab from collapsing on update, cos I've only briefly glanced at the code (and got distracted by making git work), but I think restricting the update is definitely doable. I'll take more of a look sometime in the near future.
Mar 04, 2010 PaKettle link
I am in PCC I just havent gotten around to picking up LUA...yet
Dec 12, 2010 Surbius link
bump
Dec 15, 2010 abortretryfail link
Maybe you've got too much junk? Garage sale! :D