Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Rendering Slowness (Sync Point?) #455

Open
herocrab opened this issue May 21, 2019 · 12 comments
Open

UI Rendering Slowness (Sync Point?) #455

herocrab opened this issue May 21, 2019 · 12 comments
Labels
area-Graphics bug Something isn't working

Comments

@herocrab
Copy link
Contributor

herocrab commented May 21, 2019

Release Type: Official Release

Version: 3.0 and 3.1

Platform(s): Windows

Describe the bug
UI Rendering on systems with slower processors (previous generations, a couple years old) but still very capable graphics cards experience frame rate/update rate loss when rendering Xenko UI. Toggling the UI off on these systems and the frame rate/update rate resumes to normal (or as fast as it can when running with the profiler). These are not significant UI implementations, a simple player name and HP bar player panel above a character and a kill log scroll viewer in the lower left of the screen (no greater than 8 entries).

Render groups 1-3 bypass the forward renderer and are rendered in their own single stage renderer or a shared renderer (both have been tested). Also tested with the default compositor, same results.

I've had another developer take a look at the implementations and the logic is sound, no unnecessary UI changes or updates per tick.

A number of things have been tested:

  • Font type (SDF, vs Offline Rasterized, vs Runtime Rasterized)
  • Various compositor configurations with various stages.

To Reproduce
Steps to reproduce the behavior:

  1. Create a game
  2. Add UI to it, scroll viewers, etc
  3. Profile the game on various platforms

Expected behavior
Minimal UI shouldn't cause such a significant performance impact and limits release of the game.

Additional notes
If one of the engine developers are interested I can share out my game to them, however it includes all the binaries so will be at download.

Issue may also somehow be related to #101

@herocrab herocrab added the bug Something isn't working label May 21, 2019
@herocrab
Copy link
Contributor Author

herocrab commented May 22, 2019

Full UI:
GraphicsCompositor1_Full_UI

No Scroll Viewer:
GraphicsCompositor1_No_Scroll_Viewer

No Scroll Viewer, No Hud:
GraphicsCompositor1_No_Scroll_Viewer_No_Hud

No Scroll Viewer, No Hud, No Player Panel:
GraphicsCompositor1_No_Scroll_Viewer_No_Hud_No_Player_Panel

What is ~1.5-2 ms on my system (Intel I7-8750H) is 10-15 ms on other systems with reasonable hardware.

There is some wait or sync point issue occurring between CPU and GPU for UI, whether it's the "picker" or something else I am not aware; it is currently above my skill set to debug... I fear it wouldn't be wise to release a game into the wild using Xenko UI with this occurring.

Let me know if I can be of further service.

@herocrab herocrab changed the title UI Rendering Sync Point Issues UI Rendering Slowness Issues (Sync Point?) May 22, 2019
@herocrab herocrab changed the title UI Rendering Slowness Issues (Sync Point?) UI Rendering Slowness (Sync Point?) May 22, 2019
@makotech222
Copy link
Contributor

@DevJarmo Try throwing in more UI elements in the world. Also try moving your camera closer and farther away from those elements, if you can.

@xen2
Copy link
Member

xen2 commented May 22, 2019

image
I have ~1 msec for GameMenu sample. Can you let me know your timing for reference? If yours is fast too, maybe I might need a repro sample.

Also, I heard (on discord) about timing like 10~30 msec but this doesn't seem to be the case here?
You mention 10/15 msec on slower system but are you referring to slower desktop, or mobile?

@makotech222
Copy link
Contributor

Hmm, on the game I was working on that had this problem, it seems to have been fixed since xenko v 3.0.0.3. I just tested again today with the profiler and on latest 3.1 beta, and I don't get the same issues I had before. FPS maintains around 120fps. I wonder if it was a vulkan issue maybe? I tried setting my project to vulkan (my default in 3.0), but have weird issue with gamepad not being found, so game throws exception. Don't want to dig any further on it though.

@profan
Copy link
Contributor

profan commented May 22, 2019

@xen2 for reference, same scene on my system (i7 920 + R9 390) also a release build

Full UI:
image

No Scroll Viewer:
image

No Scroll Viewer, No HUD:
image

No Scroll Viewer, No HUD, No Player Panel:
image

@xen2
Copy link
Member

xen2 commented May 22, 2019

@profan @DevJarmo Ha yes, much worse for @profan case
What are your respective CPU/GPU?

By any chance, easy for you to create a repro project (i.e. small project with just the UI slow part)?

@herocrab
Copy link
Contributor Author

herocrab commented May 22, 2019

My spec's are:

8th Generation Intel® Core™ i7-8750H Processor
Windows 10 Home 64bit English
8GB, 2x4GB, DDR4, 2666MHz
NVIDIA® GeForce® GTX 1050 4GB GDDR5

I have no problems with UI while plugged in (Laptop), though after profan had the issue I saw it on a number of other systems during a demonstration/test. I am also able to repo the issue when I run on battery power and my CPU is rate limited. Fairly certain the issue is on the CPU side. During the demonstration, In all cases, I could just toggle off the scroll viewer and/or game UI and the update time would generally drop down below 16 ms... the boxes would have no problems with 3d rendering, shadows, or particle effects.

@xen2 Interesting thing, I have a couple of older Alienware Alpha I3's with Nvidia's and they do not have the issue (at least not impacting the update rate above 16ms). Could the issue be Xenko UI rendering with Radeon graphics cards? I believe the systems in the demo which were having slowness may have also been Radeon, I will reach out and inquire and return with infos.

@herocrab
Copy link
Contributor Author

herocrab commented May 22, 2019

Other systems that experienced this were:

AMD FX6300
120 GB SSD
8GB Ram 2100MHZ
Radeon R370 4GB <--- Issue may be related to Radeon graphics cards.

@herocrab
Copy link
Contributor Author

herocrab commented May 24, 2019

@xen2 On the Xenko UI Sample I have <1 ms draw. I will ask @profan if he can test the sample.

image

Profan said he will test with the Xenko sample after he returns on the 31st.

@profan
Copy link
Contributor

profan commented Jun 20, 2019

@xen2 as promised on my system (CPU: i7 920, GPU: R9 390)
image

it generally oscillates between 7-8ms to 12ms, so.. yeah 👀 (sorry about the delay, more things got in the way)

@phr00t
Copy link
Contributor

phr00t commented Jul 17, 2019

@profan can you check the UI on my fork to see if you experience the same problem with Vulkan?

@jeske
Copy link

jeske commented May 3, 2020

I have noticed some intermittent framerate issues, even on high end hardware.

It's only happened once, but Xenko Studio game window was running at ~10fps for no reason on my machine, when it's normally closer to 100fps. Closing and opening the project fixed this, which suggests something intermittent. I wonder if this could be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Graphics bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants