mozilla / shumway

Shumway is a Flash VM and runtime written in JavaScript
Apache License 2.0
3.68k stars 396 forks source link

is there anyway to improve performance on iphone ? #574

Open hpf1908 opened 11 years ago

hpf1908 commented 11 years ago

hi , i have used shumway on ios , it works great when it is running on simulator, however after i put it on iphone5 , fps is very slow

I wonder is there anyway to improve performance and makes it works on iphone5 smooth? And is there any option I can change to reduce unnecessary caculator ?

by the way , shumway is a great job

mbebenita commented 11 years ago

There is certainly a lot we can do to improve performance. We haven't done much with iOS yet, but we're certainly interested in improving performance for mobile devices. What content are you trying to run on iOS?

hpf1908 commented 11 years ago

My tested swf is here , hopes it can help.

hpf1908 commented 11 years ago

Besides ,there are a lot of duplicated filenames in the src , and it took me a lot of time to rename them to avoid duplicating because of ios bundle does not support duplicated name in different file group.

I also can't find a compressed version of "shumway" .

yurydelendik commented 11 years ago

is there anyway to improve performance on iphone ? however after i put it on iphone5 , fps is very slow

There is another piece for the problem is speed of the JavaScript engine and canvas on the iphone. We cannot directly control/fix that. However shumway will be a good benchmark for that.

yurydelendik commented 11 years ago

My tested swf is here , hopes it can help.

Could you open a separate issue and provide source code for that? I don't think it's iphone specific and we would like to see what makes it slow.

tschneidereit commented 11 years ago

is there anyway to improve performance on iphone ?

however after i put it on iphone5 , fps is very slow

There is another piece for the problem: is speed of the JavaScript engine and canvas on the iphone. We cannot directly control/fix that. However shumway will be a good benchmark for that.

If drawing is the bottle neck (which I would guess from a quick look), then the big refactoring I'm currently doing in the shape branch (see pull request #450) might help. This is close to landing and I'll ping you here after finishing that.

hpf1908 commented 11 years ago

Could you open a separate issue and provide source code for that? I don't think it's iphone specific and we would like to see what makes it slow.

Sorry , i don't have the source code , it's created by whom i didn't know .

I just tried "Box2DFlashAS3/demo.swf", and i found that the box animation is slower and slower , not from the beginning.

tschneidereit commented 11 years ago

That's because more and more elements get added, so both the physics simulation and the drawing gets more and more costly.

hpf1908 commented 11 years ago

I have just got the fla which i have tested ,which email should i send it to ?

Besides , how about building a webpage which i can pass the flash url as a param so that I can test different files on mutilple platform easily .

My English isn't very well, hopes it can be understood, please don't mind.

yurydelendik commented 11 years ago

I have just got the fla which i have tested ,which email should i send it to ?

If you have rights to this code, please publish it somewhere on your web site or your github repo.

Besides , how about building a webpage which i can pass the flash url as a param so that I can test different files on mutilple platform easily .

See https://github.com/mozilla/shumway/wiki/Accessing-SWFs-from-Remote-Sites

hpf1908 commented 11 years ago

I have uploaded it to

https://github.com/hpf1908/rubiks3d/blob/master/temp/forThumbTest.fla