The best way to investigate the latency of your own application is to 
directly apply logging 
<https://cloud.google.com/logging/docs/setup/java#app_engine> throughout 
your code. Log the timestamps of when your application receives a request, 
before and after it performs any logic, before and after using the Google 
Cloud Client Libraries (and all other API requests), and before it returns. 
This way you can exactly pin-point what in your code is causing the 
latency. 

You can check your App Engine Dashboard  
<https://console.cloud.google.com/appengine/>to confirm that the latency is 
not mainly caused by instance startup time (as seen in the "Loading 
latency" graph), but is simply latency caused by your code (as seen in the 
"Latency" graph). One major cause could be your excessive memory usage. You 
are using F1 class instances 
<https://cloud.google.com/appengine/docs/standard/#instance_classes> which 
have 128 MB of virtual memory, but you are constantly exceeding that and 
averaging around 215 MB (as seen in the "Memory Usage" graph). This could 
lead to App Engine shutting down an instance after finishing a request, 
forcing new incoming requests to be loaded for the first time on new 
instances.

Of course this is only to help reduce the latency of App Engine. The 
latency you see from your Android device is caused by a much larger number 
of things like networking paths and connectivity. If you wish to 
investigate the latency of the Android Client library, you must instead 
eliminate any networking latency and run the library on a machine that has 
tested fast connection to Google (like the Cloud Shell) 
<https://cloud.google.com/shell/>. If you do end up finding that the 
latency is truly due to the Client Libraries (and not your network or App 
Engine application code), then you can directly report your findings to the 
appropriate library engineering team in their Github Issue Tracker.  
<https://cloud.google.com/apis/docs/cloud-client-libraries>

- Note that Google Groups is reserved for general product discussions and 
is not for technical support. If you require further support for reducing 
the latency of your application it is recommended to post your detailed 
questions <https://stackoverflow.com/help/how-to-ask> to Stack Exchange 
<https://cloud.google.com/support/docs/stackexchange> using the supported 
Cloud tags. 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/28aaeb4a-eef0-499b-9194-956a4aee438e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to