alexiscreuzot / SwiftyGif

High performance GIF engine
MIT License
2.02k stars 212 forks source link

CPU usage spikes when app enters background and then opens again #6

Closed dlush315 closed 5 years ago

dlush315 commented 8 years ago

As the title says, if you press the home button to close the app and then reopen it, the CPU % spikes by a lot. Even the demo project does this. Not sure where the issue originates but would love to know if there's a way to fix it!!

alexiscreuzot commented 8 years ago

I can confirm the bug, I'll try to see where it could come from, it seems to be a tedious one

dlush315 commented 8 years ago

Great, looking forward to hearing from you!

dlush315 commented 8 years ago

Hey just wondering, any luck?

alexiscreuzot commented 8 years ago

nope! Not much time right now to dig deep into this sadly :/

dlush315 commented 8 years ago

Ahh alright. I'm in the final stages of my app but I need a working gif engine. Love yours so I hope you can find a fix in the near future! Cheers.

sewerynplazuk commented 7 years ago

When app goes background both memory and CPU usage goes low (in my case: 30MB -> 12MB and 10% -> 0%). Normal behaviour. But when you reopen it - things goes interesting. Memory usage stay low (in my case 14MB), CPU goes up to 30-40%. I don't know if it is somehow related to this bug but it might be a clue.

alexiscreuzot commented 7 years ago

I've been looking into this but this is a tricky one.

alexiscreuzot commented 5 years ago

Tested extensively on last version of master, could not reproduce this issue