What's new
Roleplay UK

Join the UK's biggest roleplay community on FiveM and experience endless new roleplay opportunities!

Inventory system slowing down becoming laggy

Status
Not open for further replies.

Orion Acrux

Well-known member
Location
UK
Steam ID: 76561198049712267

Character ID: 84065

When did this happen: 10/04/23

Summary: Inventory system slowing down becoming laggy

Full Description:
Have notice over some period of time now that when moving a large amount of item, well over 1000. on to the floor and then into another container/storage location the inventory UI begins to slow down and lag. mean shift kicks are no longer instant can take half a second up to a couple seconds to move, and the same goes for dragging items over.

Images / Video's
https://medal.tv/games/gta-v/clips/1x0GgfoFZU9ZSd/d1337lcyFREZ?invite=cr-MSx1M1UsMjk3NDgzMTQs

 
here are the clips from my veiw, part 2 is after i restarted to reset the issue

https://medal.tv/games/gta-v/clips/1vT3PnCTJ0oAc7/d1337I26FjZp?invite=cr-MSxERWYsMzE0MzYxODAs

https://medal.tv/games/gta-v/clips/1vSUm7Gq0rMcRh/d13371m8SvjV?invite=cr-MSw3TkgsMzE0MzYxODAs

and the quick chat with mike

image.png


i can also get it to happen when i gather fruit and fill the pounder without loading onto the floor and from filling it then unfilling and placeing into the shop stock it will slow down

have tried changeing the settings in the 5M launcher for the UI lag and some other bits but nothing seems to help other than when it happens to close the game and reload

Vid 1 has a scroll through the F8 log

 
Hi, thanks for the report.

The Issue

We are currently looking into this one, but it appears the issue lies outside of our code (The stuff we actually wrote from scratch). We are using an external package to handle some of the UI functions. After some research, we have discovered a possible memory leak with this package. As you can see in the image below, when using the inventory multiple times over 4 minutes, the total memory usage seems to keep increasing (Which it shouldn't do, as everything should be getting cleared up, which its trying to do which you can see from the small drops every so often but the leak prevents it cleaning everything up.)

ExtraneousUpupa.jpg


After some further investigations, we decided to try and disable the external library, and we were left with the following memory graph.

ZestyPinemarten.jpg


As you can see, that is slightly more ideal; once it hits its peak, it never peaks over that value again. The issue we now face is we either, need to find and fix the memory leak in the existing package or write our own implementation from scratch. Neither of these options are ideal as they will take considerable time and effort. 

OK, so what now?

Well... There isn't much you can do in the meantime to avoid this issue. The inventory is pretty fundamental to playing on the server, so until a fix is implemented, you will have to relog if the inventory becomes unusable due to lag. We are looking into how to fix this and will keep this thread updated with any findings we have and any progress we make. Keep an eye on the changelog for any mention of "Inventory Memory Leak Fix". That is most likely how it will be announced.

Can you not just disable the package for us?

Simply put, no. The package is integral to the inventory working, and as such, it will not be globally disabled just to fix this issue (At this time). 

Is there anything I can do to reduce the impact?

The only thing you can do is reduce the amount you use your inventory as much as possible. The Memory increase happens when the inventory is opened or used to transfer items, so any usage will increase the Memory.

How big of an issue is this?

Common use of the inventory shouldn't cause this issue, and players should only experience this when transferring large amounts of items or over a long play session.

Will this cause server lag?

No. This is purely a Client Side (Your Inventory) issue. There may be wider impacts of it slowing down other menus in the game, but we are currently unable to confirm that claim. But no, there is no reason to suggest this would have any impact on the server itself.

We understand bugs are frustrating, especially in scripts so fundamental to the server, and we are working to fix this as quickly as we can and can only ask you to bear with us while we work on this. Thanks 

 
Update

It appears after some messing around, I've been able to fix the issue with our code and remove the memory leak. For those interested, the Memory graph now looks like the following. 

MortifiedYearling.jpg


(Much better as the peaks & troughs are not increasing over time.)

I've also done some testing in game, and it feels much smoother too, so hopefully, this should be resolved. The request to put this onto the server has now been made and is just pending a review and an update. It was a quicker turnaround than I was expecting, so happy all around!

 
Excellent news! This has now been fixed by the development team and will be released in a future server update.
Thanks for doing your bit to help us keep the servers bug free!​

200.gif

Locked & Moved to Solved
 
Status
Not open for further replies.
Back
Top