andybotting / tramhunter

Tram Hunter is an Android client for Yarra Trams TramTracker web service
http://tramhunter.andybotting.com
22 stars 8 forks source link

Extremely slow compared to TramTracker #12

Closed ceribik closed 10 years ago

ceribik commented 10 years ago

Over the past few months, I've noticed that Tram Hunter has been loading stop information a LOT slower than usual, ranging from 8-40+ seconds on average. In some cases it loads within a few seconds, but most of it time it takes longer. I've replicated the results on both 3G and WiFi. The official TramTracker app loads this information in just a few seconds.

andybotting commented 10 years ago

I've had a few reports about this.

The difference here is that Tram Hunter uses the older SOAP web services API to fetch tram information, which is the same as their iPhone app. Their Android app uses a newer JSON API, which is why you see the discrepancy.

I've have been in contact with them, but they say everything is fine. Problem is that sometimes (like right now) I'm getting quite quick responses.. and it also takes them a few days to respond to me.

I'll have to do some proper testing and provide Yarra Trams with some evidence of the issue.

Thanks for reporting.

ceribik commented 10 years ago

Ah they use different APIs.. I figured that might be the case. Thanks for the clarification.

Is there any chance of switching to the JSON API, or is that too much work? I'll probably end up using the official app in the meantime, because sometimes I can be waiting over a minute and it still doesn't load. That is on 3G though, so it might have something to do with my phone switching between different mobile data modes (due to inactivity?)

andybotting commented 10 years ago

It's been my plan to support both APIs, but just haven't found the time to properly implement it yet. There is some code already there, but it was to support their beta JSON API, so it will need updating.

andybotting commented 10 years ago

JSON API now support in the latest version of Tram Hunter now in the Google Play store. For now, you'll need to specifically enable it from the settings. Next version it will become the default.

ceribik commented 10 years ago

Works great. Thanks for the addition.