Calls take at least 500msec though logs show about 60 msec

I see some interaction at the dispatcher:

[DEBUG] [08/04/2019 07:19:47.530] [spray-server-akka.actor.default-dispatcher-4] [Http2ServerDemux(akka://spray-server)] [563] sending 10 bytes, endStream = false, remaining buffer [0], remaining stream-level WINDOW [1048502]

[DEBUG] [08/04/2019 07:19:47.530] [spray-server-akka.actor.default-dispatcher-4] [Http2ServerDemux(akka://spray-server)] Changing state from WaitingForData to Idle

[DEBUG] [08/04/2019 07:19:47.530] [spray-server-akka.actor.default-dispatcher-4] [Http2ServerDemux(akka://spray-server)] Changing state from Idle to WaitingForData

I print the time my API took using logAfter and it should 50+ msec. (it was 58 here)

And then I see the send of size as noted by the browser.

[DEBUG] [08/04/2019 07:19:47.647] [spray-server-akka.actor.default-dispatcher-4] [Http2ServerDemux(akka://spray-server)] Changing state from Idle to WaitingForData
[DEBUG] [08/04/2019 07:19:47.647] [spray-server-akka.actor.default-dispatcher-4] [Http2ServerDemux(akka://spray-server)] [569] buffered 10 bytes
[DEBUG] [08/04/2019 07:19:47.647] [spray-server-akka.actor.default-dispatcher-4] [Http2ServerDemux(akka://spray-server)] [569] sending 10 bytes, endStream = false, remaining buffer [0], remaining stream-level WINDOW [1048513]

And the browser will report a time of 500+msec. I tried Safari/Chrome/Edge all on the Mac. How do I debug where else those time was spent? It is using gzip, does gzip happen after the logs for send? Tried removing gzip and that didn’t make a different either. Tried changing the default dispatcher from fork-join to affinity-pool-executor and that didn’t make any difference. I am within the data center and so network is good. Thanks much

How are you determining when the request-response is done on the server side, perhaps there is some oversight there - for example logging when the request has arrived or the response is created rather than when the response body has been sent back and then comparing that to the client seeing the end of the response body?