Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Don't care + ratio0/10 update.
brother still banned.
Because that would allow players to sell 1.5 Million worth of cocaine maybe? If the drug limit was kept at 15, this would allow users to sell 22500000 worth of cocaine at once if they were to get that much cocaine (Which is doable)Well, I don't understand point of "50 packs of 200 cocaine" instead of 1 pack of 10,000 coca, can you explain that? Also, if this kind of change affects your server's RAM usage, it means you need to distribute the memory a bit better, have you considered using Redis? It is a reliable and scalable key:value database in-memory value.
Professionally I create a large video and chat streaming platform, I know something about optimization, I will be happy to help if you need it.
Well, I can't agree that it's gmod issue, the issue is that you're storing items in wrong way, even if the GC would work better - at some point you'd have similar issueIt's not immediately an issue with RAM, it's an issue with Garry's Mod's garbage collector. This update fixes that by reducing the number of live objects simultaneously. This essentially divides items used by drugs by 200, thus massively speeding up the garbage collector.)
Redis would not help at all in this case, we do already have a database that is _very_ fast, but we also cache all items of players on the server in the server's ram. Changing this would be the ideal solution, but would both slow down accessing inventories significantly and take a long time to change the code.
The first way of storing items is the "correct" way, especially in a database (except for storing the name on every object).I don't know how you store such items, but for instance
It's more expensive to have
{id: 1, owner: 2137, name: "Coke"}
{id: 2, owner: 2137, name: "Coke"}
{id: 3, owner: 2137, name: "Coke"}
{id: 4, owner: 2137, name: "Coke"}
... and 9996 more items allocated
than
{id: 1, value: 10000, owner: 2137, item_id: 22}
It does boggle the mind how people can hoard so much stuff