dougblack / nextbus

GT NextBus - An Android app
17 stars 6 forks source link

Regarding current issues. #7

Closed darkzeroman closed 11 years ago

darkzeroman commented 11 years ago

@keveleigh said on the earlier issue thread, but I wanted to move it so we can be done with that long thread.

The Favorites list can be rotated horizontally on screen rotation, but the rest of the app stays vertical.

You're right, I can guess why. I don't see that bug on the emulator, but I added what I think is needed to fix the problem in the manifest. It involved adding "configChanges" and "screenOrientation" xml attributes to the Activity in the manifest.

Rarely, the time updates don't seem to be super reliable. Sometimes the time will display as soon as I open the stop page, but other times it takes a few refreshes and "Error, Server Down?" messages.

Okay, so I made my own API to scrape the web pages that is hosted on Heroku. As a part of the free plan, I get only 1 dyno (think of it as a process). This dyno handles the requests, but due to I'm using a free plan, the dyno goes to "sleep" when not used for a long time. And then when the server has another request it needs to wake up the dyno which takes approximately 10-15 seconds.

So in another way, if no one requests updates about the predictions for a long time, the server dyno goes to sleep, and on the next request it takes about 10-15 seconds for it to wake up.

And I've added a timeout function in the code that brings up that error whenever a request isn't completed in 5 seconds or so.

I'm looking into how to keep the server alive during the long periods time of inactivity. I think it would involve pinging the server every 30 minutes to keep it alive.

I will look into testing more of the performance of the server soon.