fnoori / Vivyd-Calculator

0 stars 0 forks source link

Boot times unreliable. #69

Open amairJD opened 7 years ago

amairJD commented 7 years ago

Boot the app, took 5 seconds to load and said it took around 2300 ms. Doesn't always do this, but we got to figure out why it does this in the odd case. Does this on moto g and omar's g4 sometimes.

If I was a user and saw this I would have uninstalled by now. Let's make it a priority, I'll start fixing all the warning messages from the XML's asap.

fnoori commented 7 years ago

Just need to get rid of the warnings that say something along the lines of "...this may effect performance..."

amairJD commented 7 years ago

10 4 😃

amairJD commented 7 years ago

So after going through the xml's and replacing many linear layouts with table layouts, my moto G manages to boot about ~200ms faster than before :smile:

But let's try and get it to go even faster

amairJD commented 7 years ago

Dang man, it still does that thing where it sometimes takes literally 12 seconds now to open on my phone. I've seen this twice after the most recent pull, both times when I hadn't opened the app in a while.

I'm gonna see if I can time the weird opening correctly and see if anything fishy in logcat

amairJD commented 7 years ago

So I can confirm that nothing in onCreate is causing the case where it sometimes takes 10 seconds to load. OnCreate reported to have taken 604 ms, but in reality i was waiting about 10s. It's something else, somehow.

Dear god I hope this is just a problem with the way the Android studio app works. It will be really problematic on release.

fnoori commented 7 years ago

onCreate was my main target for boot times since, it is the first piece of Java code that is being run. To be honest bro, I'm at a loss as to what is casing the slow start times I did notice on the iPhone calculator, sometimes it takes a few seconds to boot while other times it takes literally 4 seconds and sometimes it's instant.

amairJD commented 7 years ago

I am starting to think that this problem is exclusive to when we install the apk through android studio and not the app store.

I reinstalled the older version of the app (where the problem still occured) from the playstore onto Omar's G4. If I don't run into the launch time issue than we can safely assume that when we get our app on to the play store, it will work fine

amairJD commented 7 years ago

So far so good on the G4 actually.

So I think it might just have that occasional super long load time on devices that are installed via the android store. but I have no idea why.

Oh well, keep an eye open for any small chance we can increase boot time speed further.