Hey folks,

We’re currently trying to build a Android VR game and was checking the profiler and noticed that Slate is eating up a lot of milliseconds despite having no UI. What is it rendering that is taking so long?

Let me know if there’s anything else y’all need to understand my problem better!

Did you create the stat file within the editor? (playing in PIE) if you did so, these slate stats just might be the editor itself.
For major perfomance debuggin always profile from the device or at least standalone.

If you got those high ms from a standalone game or launch on device and not having any UI it might be possibly a bug?

Hey pDunkl,

This is a .ue4stat file that was pulled from the packaged project on the android device itself. I’m hoping there’s an easy fix. I saw that a long time ago the Tick() function ticked all widgets even if hidden. But again, I don’t have an UI whatsoever which makes this all the more weird.

Oh okay, than it’s kinda weird if it’s from the device.

When you say “hidden” are the widgets visibility on “hidden” or on “collapsed”?
Because afaik “hidden” only means just don’t show it at the screen but calculate like normal and “collapsed” hides and stops layout calculations or so. Therefore I only use collapsed, never hidden, and never had any perfomance issues, even with 400-500 animated widgets on an GalaxyS6. (Very big slot inventory overview) - 60fps

At the time the statfile was created where any debugging visuals active? For example stat slate, stat game, stat rendering etc. If so, they have a quite heavy impact.

Without the statfile, but just running the “stat unit” command on the device, are the ms normal (then it might be a bug with the stat file) or does the game also run with that high ms?

Could it be, that you set your widgets to volatile, so they never cache and all OnPaint functions are called on tick?

Btw. it may probably not may have that much of an impact but do you use invalidation panels? On my project the slate time get effectively halved with them.

I’ll think on more possible reasons later on, if these hints didn’t do the job. :slight_smile:

Sorry maybe I misspoke, my game contains absolutely no UI. I tried a simple text element to display the fps to me but opted to remove it and it’s code from the player pawn.

The only two things in my scene are a higher poly character(~65k tris, 210 bones + a 900 keyframe, 30s long animation) and a rotating cube so I can have a better sense of the framerate. I’d expect the character to be the bottleneck and when I look at the character with “stat unit” on the game does jump from 10ms to ~30 ms per frame. But when I look at the profiler it says it’s still the RenderThread>SlateDrawWindowsCommand>Slate RT: Rendering>Self that’s taking about ~20ms alone.

This isn’t a skeletal mesh renderer is it? Where’s epic when you need them? :stuck_out_tongue:

Ah now I understand your problem, but I’m not sure what may be the cause.
That’s quite a big jump with stat unit, but I assume it’s because its VR.

Anyway, did you try it without the character? Just testing with a button to toggle visibility or so
I’m making assumptions but maybe because of ‘renderthread’ being in there it might be something related to well… rendering , it may be to heavy to handle for VR on your test-device (which device?) .
How many material-slots does the character have and how complex are those?

Do you use any kind of lighting and baked shadows, anything like that? Thats quite costly for mobile.
Instead use unlit materials and put as much as possible in the vertex shader, use as few shader instructions as possible.

Did you try to turn down the rendering resolution? (r.mobilecontentscalefactor to 0.8 , or just the plain 3d rendering resolution with sg.resolutionquality to 45).
Usually this load would show up under the gpu, but perhaps because it’s VR (I’ve no experience with VR) that the two views are rendered and then internally sent through some slate stuff?

Also, did you close every other programm on your device, Android does not put everything to sleep when it’s not in use and even then I noticed some perfomance differences.

Please I also need help on that, I have this problem as well but on PC, not on mobile.