akexorcist / GoogleDirectionLibrary

[Android] Library for Google Direction API for Google Maps Android API v2
Apache License 2.0
571 stars 174 forks source link

Directions rawBody is created on main thread #66

Closed v-mas closed 4 years ago

v-mas commented 5 years ago

https://github.com/akexorcist/Android-GoogleDirectionLibrary/blob/c13996e1a89cf484b8b9781ac3610313bcb2052a/googleDirectionLibrary/src/main/java/com/akexorcist/googledirection/request/DirectionRequest.java#L116

Callback runs on MainThread, and there is creation of json from response. In case when the path is long (ex. walk path across whole country) the conversion may take a while and cause application to hang (path of 700km converts on slow phone for 2 seconds)

akexorcist commented 4 years ago

I removed this value in https://github.com/akexorcist/Android-GoogleDirectionLibrary/commit/fa42e57d6ace382f3362931788a5598977ab9ba1

There's no reason to use this value