Delay with gmap.on_event: What data is being communicated?

Hello,

I’m currently trying to debug some strange behavior with bokeh: We have a dashboard where we use gmap to display some patches and circles. We connect clicks on the map via

gmap.on_event(events.SelectionGeometry,              
              select_health_facility_from_map_click) 

Now for the behavior I’m trying to understand: Whenever I click on the map (either a patch or a circle), the dashboard locks up for ~40-50s. I’m running the bokeh serve on a remote server and open the dashboard on my local machine (I tunnel the traffic through an SSH tunnel). I’ve added a debug print to the ‘select_health_facility_from_map_click’ function and it only prints to console after the delay. To further debug I opened ‘nload’ bandwidth monitor both on the server and my local machine and I can see that after I click an entity on the map I saturate my upload (~1MBit/s) for the delay of 40-50s and I can see the same speed as ‘incoming’ on the server.

This makes me wonder what seemingly large amounts of data are being transferred? Does this depend on the amount of data displayed on the map? We see the same delay on our production deployment with no ssh tunnel in between.

Thanks!
Johannes

Please always provide relevant version information in every question. Your description possibly seems like this issue:

[BUG] Python callback triggered by SelectionGeometry event is slow compared to js equivalent · Issue #11169 · bokeh/bokeh · GitHub

which was resolved in version 2.3.2

cc @mateusz I also thought I recalled a regression where there entire document was being serialized unintentionally, but I can’t find anything after a search on GH. Do you recall if that was ever the case, or have a reference to an issue or PR?

Perhaps this issue?

1 Like

That’s the one, evidently “references” was the search term I didn’t think of. Thanks @_jm

@Johannes if you are seeing an issue with 2.3.1 or later then we would need a Minimal Reproducible Example to investigate directly.

Upgrading to 2.3.2 (from 2.3.0) did the trick! Thanks!