How can I reduce memory usage

I have a voting system in my game where I have used a lots of remote events…
a remote event to start the system, send clints the chosen map and mode…
As the time between them firing is very less, I think they are using memory (600 - 700 MB).

Also I have stored UI’s in replicated storage and when necessary it will be cloned and parented to player gui… Is this a good practice ?

1 Like

First, I believe there’s a module for replacing RemoteEvent called FastNet. Second, that’s bad practice because hacker’s can use DarkDex to clone the UI to the PlayerGui. If your gonna clone the UI to the PlayerGui then do it by server and put the UI’s in ServerStorage.

1 Like

I’m sorry but unless it is some sort of secret UI it is okay to use ReplicatedStorage to store your UIs, after all it only puts more stress on the server if you handle the UI in the server, and the UI will already be loaded on the client so it is easier to clone.

2 Likes

How big could putting a UI in PlayerGui be a stress.

2 Likes

It’s not that, it’s that adding the UI via the server when you really don’t need to is unneccesary, as calling WaitForChild or using a RemoteFunction seems pretty unneccesary when the player can just clone himself.

2 Likes

You should be good but you might have to make sure your remote events are debounced just to prevent them from getting spammed other than that you should be good, unless you’re relying on replicated storage too much, and which case, I would make the game have a longer preload time by negating assets from replicated storage and putting them into either workspace lighting, somewhere the assets aren’t shared by clients more than usually. Also, less looping logic, more script connections!!

3 Likes

Usually Having a Small Window uses less Memory,

Most of the time, your Memory will Drop by 40% - 60%

Isn’t the best way but it works either way


Another way to Remove Memory Usage is to Delete Trash on your PC, Roblox and other apps create Dump Files, delete them

If You Are On Windows:
Open the Run Tab by Pressing: Win + R
(Win is the Window Key)

Type in the Following Keys:

  • %temp% (I wouldn’t Recommend this always)
  • temp (Neither is this)
  • prefetch

Delete everything in there as it is Usually all Trash from Apps, However this is a Temporary Solution as it will all come back, unless you have an Automatic Cleaner of some sort

Please Note that this doesn’t always work as intended, sometimes it can have Minor Effects to your PC and I wouldn’t really recommend doing it either.

If you would like to Know More about this:

If you delete “prefetch” files

If you delete “temp” files