Debo Posted March 23, 2020 Share Posted March 23, 2020 Hello, I am working on a low end box and I have created Pixi application which will render around 60-70 sprites out of them 50 are created from same texture and around 100 bitmap text components. My issue is after box boots up my app takes around 4 to 5 seconds to render every thing on screen. But if I exit and launch after 5-10 min then it renders in 2 seconds. What could be the reason? Does Pixi cache components also and that's why second launch creation time reduced? How can I improve my first launch creation time and match with second launch creation? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 23, 2020 Share Posted March 23, 2020 (edited) That sounds like a memory allocation problem of cordova. Please give more details. I guess you have to pre-create elements and do at least one render() operation before you actually start the app for user. Also pixi creates many extra objects in renderer, you can reduce that number, however you need to profile memory first. I wont do it for you, I dont have your box. Edited March 23, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
Debo Posted March 23, 2020 Author Share Posted March 23, 2020 Thanks Ivan! I will check the memory allocation. Right now I am creating elements before the first launch to reduce this launch time. But I thought this is not the correct fix and I should ask proper way to fix this to the experts. I am creating bitmap font and some bitmaptext components before my app. But I have noticed that if I remove all bitmaptext completely then my app launches comparatively fast. What else I can do to launch and render all my bitmap texts fast? Also could you please give me some pointers on which extra objects Pixi creates in renderer and how I can reduce them. I know there are limitations since you can not access my box but any direction would be great help! Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 23, 2020 Share Posted March 23, 2020 I'm not sure which objects are bigger. You have to look in profiler. I'm afraid that if f I tell you anything, you'll get on false trail. Make sure all textures are bound one time (that's why we need first frame!). Dont use prepare plugin - do the job manually through "renderer.texture.bind". Dont just look up those in docs - use pixi sources. Quote Link to comment Share on other sites More sharing options...
Debo Posted March 23, 2020 Author Share Posted March 23, 2020 Thanks Ivan. I will check it. 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.