Mobile devices use 2x (or more) memory than PC?

Hello, this is my first post on the forums, so I apologize if I mess anything up. Or if this isn’t the correct category

  1. What do you want to achieve?
    I am trying to reduce memory for mobile users

  2. What is the issue?
    I have found that PC users use about 400-700mb (give or take) of memory. Meanwhile, Mobile users usually get 900-1500mb of memory.

  3. What solutions have you tried so far?
    I tried to see if anyone else has a similar issue. But I can’t find anything. I also disabled certain mobile features like the mobile sprint button, with no results

Things to note:

  • This has been happening for about 3 weeks
  • Mobile users get 200-300mb of untracked memory most of the time
  • This currently isn’t a major issue for me, but later on, it might.
  • I understand certain devices have very different memory, but it seems off mobile users have 2 or more times more memory than PC
  • I am pretty sure Apple devices are more memory efficient, so the memory usage could be even higher on Andriod devices

I am using an Apple iPad Pro (the one WITH the home button) with 4RAM. I am unable to test my game with other devices. Here is my place with the issue: Nations of Glory - Roblox

This could be an issue with my mobile device, or something like that which is why I linked the game since some of you may get different results. I have asked some of my friends to try (PC) and they all got 400-700.

here are some screenshots:



here is the sprint script, where there are two buttons. One is “Sprint” while the other is “Stop Sprint” which are on top of each other, each disabling each other when pressed. I commented this entire section, with almost no difference being made
this is a section of the sprint script:

if InputService.TouchEnabled then -- checks if the player is a mobile user 
	Frame.Parent.Sprint.Visible = true  -- makes sprint button appear
	Frame.Parent.Sprint.MouseButton1Click:Connect(function()
		sprinting = true -- boolean value defined earlier in the script determining if player is sprinting
		Frame.Parent.Sprint.Visible = false
		Frame.Parent.SprintBottom.Visible = true
		while Frame.BarUp.Size.X.Scale > 0.01 and sprinting == true do
			player.Character.Humanoid.WalkSpeed = 30
			Frame.BarUp.Size = UDim2.fromScale(Frame.BarUp.Size.X.Scale-0.01,Frame.BarUp.Size.Y.Scale) -- reduces sprint bar 
			if Frame.BarUp.Size.X.Scale < 0.02 then
				player.Character.Humanoid.WalkSpeed = 16
				sprinting = false
			end
			wait(0.1)
		end
	end)
	
	Frame.Parent.SprintBottom.MouseButton1Click:Connect(function()
		Frame.Parent.Sprint.Visible = true
		Frame.Parent.SprintBottom.Visible = false
		sprinting = false
		debounce = true
		player.Character.Humanoid.WalkSpeed = 16
		while Frame.BarUp.Size.X.Scale < 0.7 and sprinting == false do
			Frame.BarUp.Size = UDim2.fromScale(Frame.BarUp.Size.X.Scale+0.01,Frame.BarUp.Size.Y.Scale) --regens sprint bar
			if Frame.BarUp.Size.X.Scale == 0.7 then
				debounce = false
			end
			wait(0.15)
		end
	end)
end

for PC, (a section of my script above that) instead of having a TextButton.Mousebutton1Click I used the userinput service to check if the Shift button was being pressed.

I hope I shared enough details, if any more is needed I can provide them

7 Likes

It seems like this is no longer the case. Either I changed something that caused it, or a roblox update fixed this. The same device now gets 700Mb and so do the others.

2 Likes

Your script is fine and is not causing this problem.

There is a bug in PathfindingService that causes this excessive memory usage in all platforms.
It is most noticeable in big places with sparsely distributed moving parts, but it also occurs randomly.
Because of Roblox’ native ControlScripts, games can run into this problem even if they don’t invoke pathfinding directly.

A fix is in the works, I will keep you posted.

Also, this bug report was really helpful. Thank you!

14 Likes

A fix for this problem was released today.
Please let me know if you see it not working, or any other regression around Pathfinding.

4 Likes

I’m still experiencing this bug on mobile (Android being more specifically). The amount of untracked memory in my game client is 0 on Desktop and 200-300 MB on Android, making the game lag noticeably on low end devices. I experienced the same thing playing Piggy. On Desktop the game has 66 MB of untracked memory. On mobile this number surpassed 400 MB. All those numbers were recorded right as I joined the game.

2 Likes

This issue is still there I believe, in my game it can be 650-700MB of memory, and on mobile it can be upward to 1GB…

1 Like

Mind filing a full report so we can investigate?

1 Like

This report was marked as solved, feel free to file a new bug report for new issues