haxeui / haxeui-openfl

The OpenFL backend of the HaxeUI framework -
http://haxeui.org
MIT License
42 stars 14 forks source link

[HTML5] Performance lost #46

Closed flashultra closed 3 years ago

flashultra commented 4 years ago

When I use haxeui with openfl and target HTML5 have performance lost ( from 60 fps to 20-25 fps) Here are two screen records for html5 and flash version ( fps is visible on the top left side ) 1) HTML5 version haxeui-html5

2) Flash version haxeui-flash

Here is the sample project: https://drive.google.com/file/d/1dU1pZnuDigtWAuxgu0jDlbq7rumU9_ly/view?usp=sharing

ianharrigan commented 4 years ago

Hmmm - thats annoying!

When i run the app i dont get any perf issues. Makes it pretty hard to debug :/

perf

flashultra commented 4 years ago

Strange. You can try on Firefox ( it's worse than Chrome) . Also at the moment have 25 elements in the list which maybe is not enough . My laptop is
Intel Core i5-4300M CPU @ 2.60GHz Intel HD Graphics 4600 with Driver version 20.19.15.4549 ( 11/10/2016 ) (latest available) Testing with git version on haxeui-core and haxeui-openfl.

Also using Openfl 8.9.5 and Lime 7.6.3

flashultra commented 4 years ago

@ianharrigan you can try compile html5 version here : https://bgsvara.com/hx/ I think maybe my latest version ( Openfl 8.9.5 and Lime 7.6.3 ) could be the problem.

ianharrigan commented 4 years ago

perf2

Feels more fluid than the last - was it supposed to be slow?

(ps: noticed you are missing some haxeui stock images also, like the arrows for the scrolls - nothing to do with this, but just something i noticed)

flashultra commented 4 years ago

Yes, it should be slow that before. Very strange. Could I ask what graphic card you use ( and how old is the driver) ? I suppose you test under windows ( not linux or mac ) ?

I just tried to switch off opengl support ( using <window allowHighDPI="true" hardware="false" allow-shaders="false" require-shaders="false" depth-buffer="false" stencil-buffer="false"/> ) and performance is much better ( https://bgsvara.com/nohx/ ) .

So maybe the problem is with openfl ( and OpenGL under Windows 10 )

ianharrigan commented 4 years ago

"nohx" seems just as good. How is nohx for you?

dxdiag is:

image

image

flashultra commented 4 years ago

nohx is solid 61 fps for me, but this is only CPU render , not OpenGL. Still wondering what cause the problem. Maybe 2 GB VRam is not enough for OpenGL ( this is on my laptop) dxdiag