fnoori / Vivyd-Calculator

0 stars 0 forks source link

hiccup in performance occurs when ad is trying to load #86

Open amairJD opened 7 years ago

amairJD commented 7 years ago

By moving it from the start , we did lower the boot time a bit but I wonder if it's possible to load the ad in a separate thread so it doesn't interfere with the responsiveness of the buttons? Or is that what handlers already doing?

fnoori commented 7 years ago

Handler basically says, run this code after x milliseconds. So run everything else but load this code after x milliseconds. Doesn't mean that it stops everything else keep in mind.

amairJD commented 7 years ago

Yeah I know, I was just wondering whether handler works like a separate thread. Like when handler runs after, say 2000 ms, does it run simultaneously with the whatever code the program it reaches to at that point, like a thread? Or does it like stop whatever it's doing, go and do the handler stuff, and then continue?

fnoori commented 7 years ago

I'm not too sure about this one, I can try loading the ad on a different thread to see if performances is increased

fnoori commented 7 years ago

Multi-threading causes app to launch >1000 ms At this point, Handler is the method of choice, as it launches the app < 600

amairJD commented 7 years ago

Yes, that is much too long.

Why not combine multi threading with Handler, if possible? So that it only tries to launch the ad thread after everything else is loaded?

fnoori commented 7 years ago

Multi-thread and Handler, results in a little bit slower when compared to just Handler

amairJD commented 7 years ago

That make sense but let's bring this up again when we meet up next

fnoori commented 7 years ago

if we wanna release this soon, we won't have time to meet bro