View Issue Details

IDProjectCategoryView StatusLast Update
0002125NoesisGUIC++ SDKpublic2021-12-06 18:19
ReporterRingo Assigned Tojsantos  
PrioritynormalSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Version3.1.1 
Summary0002125: Sample code is not energy-efficient
DescriptionIntegration samples and NoesisApp framework are rendering at maximum framerate, even when nothing is changing on a screen.

While I understand those are just examples and many games render at maximum framerate by design anyway,
I think the code should be fixed, because:
- Users will copy the code as is and do not realize it can be improved;
- It is a shame sample code do not promote one of the strongest selling points of NoesisGUI;
- Currently there are some subtle issues with variable framerate in NoesisGUI, probably because such code path is not tested much;
TagsNo tags attached.
PlatformAny

Activities

jsantos

jsantos

2021-09-21 13:49

manager   ~0007467

Last edited: 2021-09-21 13:52

Our application framework is doing this on purpose because this is the typical scenario for videogames. We have plans to create a specific example showcasing render on demand. For that we need extra things on the application framework (we need to detect the sync rate and sleep, this is natively available in many platforms like Choreographer in Android - we are already using it -).

Could you please elaborate about 2 ( It is a shame sample code do not promote one of the strongest selling points of NoesisGUI) and 3 (Currently there are some subtle issues with variable framerate in NoesisGUI)?

Ringo

Ringo

2021-12-03 11:58

reporter   ~0007638

Sample code I've mentioned is ApplicationLauncher\Src\Window.cpp, it doesn't use the return value of Noesis::IRenderer::UpdateRenderTree() to skip render.

As for my code, it is not easy to reproduce properly, but the issue I am having is:
When rendering on demand, there are occasional spikes in performance of Noesis::IRenderer::Render()/RenderOffscreen().

Jank happens after somewhat long periods of update w/o render.
The typical timeline is:
* .......
* update, skipped render (0ms)
* update, skipped render (0ms)
* update, skipped render (0ms)
* update, skipped render (0ms)
* update, render (30ms) // abnormally long render
* update, render (2ms) // back to normal
* update, render (2ms)
* update, render (2ms)
* .......
Ringo

Ringo

2021-12-03 12:07

reporter   ~0007639

If I do not use the return value of Noesis::IRenderer::UpdateRenderTree() to skip render, then there is no jank. The performance is consistent.
jsantos

jsantos

2021-12-06 14:49

manager   ~0007653

When skipping rendering, I assume *only* Render() and RenderOffscreen() are skipped, right? You should keep invoking Update and UpdateRenderTree consistently.
Ringo

Ringo

2021-12-06 18:19

reporter   ~0007658

Yes, Update and UpdateRenderTree are invoked consistently on vsync signal.

Issue History

Date Modified Username Field Change
2021-09-20 22:50 Ringo New Issue
2021-09-21 13:49 jsantos Note Added: 0007467
2021-09-21 13:49 jsantos Assigned To => jsantos
2021-09-21 13:49 jsantos Status new => assigned
2021-09-21 13:49 jsantos Status assigned => feedback
2021-09-21 13:50 jsantos Note Edited: 0007467
2021-09-21 13:50 jsantos Note Edited: 0007467
2021-09-21 13:52 jsantos Note Edited: 0007467
2021-12-03 11:58 Ringo Note Added: 0007638
2021-12-03 11:58 Ringo Status feedback => assigned
2021-12-03 12:07 Ringo Note Added: 0007639
2021-12-06 14:49 jsantos Note Added: 0007653
2021-12-06 14:49 jsantos Status assigned => feedback
2021-12-06 18:19 Ringo Note Added: 0007658
2021-12-06 18:19 Ringo Status feedback => assigned