fengFanYong Posted February 2, 2018 Share Posted February 2, 2018 I created a lot of sprite and graphics,But only a little refresh is needed each time,In order to improve the efficiency of refresh,what should i do? thanks! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 2, 2018 Share Posted February 2, 2018 You should give more information My telepathic powers take a leave. Right now I have too many answers for your question, please narrow it down. Quote Link to comment Share on other sites More sharing options...
fengFanYong Posted February 2, 2018 Author Share Posted February 2, 2018 @ivan.popelyshev I have many sprite or graphics in page,But only one need to move,if render all sprite or texture each time,it is change so slow,the animation unfluent,In order to improve the efficiency of refresh,what should i do? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 2, 2018 Share Posted February 2, 2018 Either provide more information, either learn how WebGL acceleration works and how pixi renders sprites. Not everything you think about is actually slow. Default pixi behaviour is to render everything every frame, you cant change that unless you have a clear idea of how to optimize something. Not like "may be if i dont move things and cache this..." , but "I really know how webgl works and im ready to spend time on this particular optimization suited for my project" Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 2, 2018 Share Posted February 2, 2018 I have hundreds of ideas for Sprite and Graphics optimizations, which one do you need? Quote Link to comment Share on other sites More sharing options...
fengFanYong Posted February 5, 2018 Author Share Posted February 5, 2018 Can i set the 'cacheAsBitmap = true' of the shape that do not need to be refreshed? Quote Link to comment Share on other sites More sharing options...
fengFanYong Posted February 5, 2018 Author Share Posted February 5, 2018 @ivan.popelyshev Can i set the 'cacheAsBitmap = true' of the shape that do not need to be refreshed? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 5, 2018 Share Posted February 5, 2018 Dont use cacheAsBitmap on single shapes, it wont give you any performance bonuses. Quote Link to comment Share on other sites More sharing options...
Gerente Posted February 6, 2018 Share Posted February 6, 2018 seems like he need to lower the FPS of the render engine to avoid consuming unnecessary "rendering" process ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 6, 2018 Share Posted February 6, 2018 19 hours ago, Gerente said: seems like he need to lower the FPS of the render engine to avoid consuming unnecessary "rendering" process That's my kind of joke. Quote Link to comment Share on other sites More sharing options...
botmaster Posted February 7, 2018 Share Posted February 7, 2018 That sounds like you are looking for a wrong solution to a wrong problem, sure sometimes you want to optimize things but sometimes all you need to do to get the best performance is the CORRECT approach. Seems like you have a bunch of static object and a few or one non static but because of your setup they all need refreshing even though only one does really need it or something close to that. The solution is not to optimize anything here, the solution is to not set your objects like that in the first place. object that don't need updating > in container that don't need updating, objects that need updating > in container that needs updating ... ect .... With any technology you will never be able EVER to optimize anything that has been badly thought of and badly put together in the first place, it seems this is where you need to start. Tell us why your setup is like this and tell us what's your goal in doing it like this and I bet we'll be able to help you set it up in a way that won't require any optimization. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.