react-native-image-sequence icon indicating copy to clipboard operation
react-native-image-sequence copied to clipboard

Increase performance of loading images before animation starts

Open tomchambers2 opened this issue 8 years ago • 3 comments

I'm having an issue where a 23 frame PNG sequence takes about 500-750ms to load in before it starts animating. During this time it seems to lock the thread (as far as I can tell). Is there any way to decrease this time somehow? Is the only way to use images to load them using UIImage?

My application uses drag and drop for animated cartoons, so when the new animation is created on drag, it sticks until all the images have loaded. I also have an issue where if I load more than 9 animations it runs out of memory.

tomchambers2 avatar Feb 01 '17 23:02 tomchambers2

@tomchambers2 I'm curious, how big are your PNGs in pixels?

xaphod avatar Jul 28 '17 15:07 xaphod

@xaphod Was a while ago, some are quite large. Example one is 1883 × 1024 pixels here: https://github.com/tomchambers2/graublaumiau/blob/master/src/assets/game_objects/images/boden1%402x.png.

tomchambers2 avatar Jul 31 '17 10:07 tomchambers2

Ok thanks. Yeah that's pretty big, but I had bad stuttering even with 160x160 pixels. I ditched this pure JS approach and took a native one. On Mon, Jul 31, 2017 at 6:25 AM Tom Chambers [email protected] wrote:

@xaphod https://github.com/xaphod Was a while ago, some are quite large. Example one is 1883 × 1024 pixels here: https://github.com/tomchambers2/graublaumiau/blob/master/src/assets/game_objects/images/boden1%402x.png .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/madsleejensen/react-native-image-sequence/issues/4#issuecomment-319029174, or mute the thread https://github.com/notifications/unsubscribe-auth/ADmfLk2fEFvH6gTyhOPfWs85UiQGHdg8ks5sTauGgaJpZM4L0ho5 .

xaphod avatar Jul 31 '17 11:07 xaphod