-
Notifications
You must be signed in to change notification settings - Fork 2k
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
stagegl 8x performance drop on low end phones ? #890
Comments
I responded regarding framerate in your other thread
Did that help? |
From an architectural point of view, this is not a possibility. The amount of information needed to correctly position each card when stored in a hierarchical display tree requires JavaScript computation or using that much GPU overhead you loose every gain you would get. We push what we can off to the GPU. One of our shortlist items is a "Particle" container, this will have a shallow depth negating the hierarchical position expenses, allowing us to push more onto the GPU and get more speed out. Usually low end device performance issues come from a problem with too many textures, as texture send rate to the GPU is one of the biggest killers for performance in WebGL, I want to make sure something like that isn't what's going on. Could you turn on Furthermore, if it really is an efficiency problem with the vertex buffer you could try adjusting the |
thx David. Anyway I am trying various DEFAULT_MAX_BATCH_SIZE values Draw[1486:2917] : drawFinish |
lannymcnie those animations i responded in #888 . thx a lot it was my fault. Sorry about that. ;( |
you are hitting a "textureOverflow" but only one, if there was any way to reduce the number of specific new textures I might recommend that, but that doesn't seem like an easy win for 8x. Was this taken on the problem device? as different hardware has different texture overflow points. Then again I might also recommend the exact opposite of less textures given one of your other comments. From what I gather sometimes you're drawing a lot of static elements some times and would love a way to not have to not update them? Have you looked into our For the cost of a new texture you can pre-render everything in a container and never worry about rendering it again until something changes, and then you can just
Caching isn't wise for something that's under constant animation as it just makes drawing it harder because it's updated every tick, but for something updating sparsely, then it is a huge win most of the time. Hope it helps. |
Yes I am still working on this low end device (samsung galaxy s3 mini). We are already using caching due to texts requiring it in stagegl. Ie we converted all our text rendering to call .cache(bounds) after .text=. we collect bounds just once since they dont change. I guess some overdraw can be mitigated by flattening to one texture as you proposed. problems are those dirty areas. since dynamic text can be over multiple areas that would need to be updated too. Thx for the tip I try what can be cached. But first I will try to draw static stuff just once by disabling glclear if there is any and. I guess |
Hi guys. I know stagegl is in early stages. And we are glad that 2d stage can be moved to webgl easily just by changing stage to stagegl. The most important idea to move everything to webgl was performance gain.
Due to text and single spritesheet limits we had all mostly static gui in 2d canvas rendered over heavily animated gl canvas
Good thing is game somehow works just by simple stage->stagegl word change as mentioned in docs. Unfortunately animations run fast(15 fps framerate anim param seems ignored) also masking doesnt work but must importantly we are seeing nearly 8x drop in fps on low end devices where we need fps most. The main culprit is I guess inefficient buffersubdata upload to gpu every frame (due to bad drivers on cheap devices ?). having static vertices and modifying them each frame with shader constants each frame is faster at least on my desktop measurements it was 10 times faster.
I am attaching screenshot how much time it took to render two stages (samsung s3 mini) on old and one merged stage on new createjs
The text was updated successfully, but these errors were encountered: