Odd WebPopupMenu Delay

I have a web app that uses a popup menu to select a picture from a database to display in an ImageView. I get the data and put it into the ImageView.Picture in the menu’s SelectionChanged event. The weird thing is that the first few times I use the menu, the selected picture displays essentially instantly, but before long, at random times (not related to the picture size) it can take up to 10 seconds to display the picture after I release the mouse upon selecting the menu item. When there is such a delay, I can display the picture instantly by simply clicking on that menu again. Some testing that I have done strongly indicates that when there is a delay, it is because the SelectionChanged event is simply not firing immediately.

Anyone have any idea what is going on here? It can’t be that something is delaying computation or there is a problem with internet response time because clicking again on the menu always instantly displays the picture (also, I am running the app in Debug mode). I’d settle for a workaround that has the same effect as manually clicking the mouse a second time.

I’m running on OS X 10.10.5. Xoxo 2016.2 with Safari 9.1.2 as the test browser. Ideas would be greatly appreciated (I have a deadline).

I have now deployed the app to Xojo Cloud, where it seems to work just fine (no unexpected delays). So I guess I do not need help after all. But it is still a puzzle for anyone interested: why does the debug version show these delays?