Maybe due different C3X version? I'm on R25. Or maybe one of the AIs doesn't declare embargo on you - there's that funny thing where some x86 computation (and RNG) instructions give different output between AMD and Intel CPUs, maybe it affects AIs diceroll on whenever to embargo you or something.
Good idea, I testing with R26. But surprisingly that's not it, when I test again with R25 I still get 264 calls. Very odd. Have you changed anything in the C3X config? For my tests, I've only set measure_turn_times and convert_some_popups_into_online_mp_messages to true. I highly doubt it's related to RNG since I've never seen the game use any of the x86 RNG instructions. Its main, and probably only, random number generator is a basic linear congruential generator, so each number is generated by a couple of basic integer operations.
This talk about performance got me curious about what the breakdown of CPU time looks like after optimizing sea trade calculations, so I ran the same Monstrosity test again with Intel VTune attached for profiling. I'd done that before Trade Net X and found that the game was spending 90% of its time on sea trade so didn't look at much beyond that. Here are the results for the top 20 functions with names inserted by me:
(This is for three turns and loading the game was included in the profile too.) The trade network calculations are still at the top of the chart but I already knew that from the basic C3X turn timer. This save is such a torture test for sea trade that even after fixing the fact that the calculations were wasting ~97% of their efforts, those trade calculations are still a large chunk of the overall turn time. However, on all other saves I've seen, the trade network is 5% or less of turn time so I don't think it's worth it to hammer further on that.
Sadly I don't see any more low hanging fruit for optimization here. Map::get_tile has a needless middleman array that could be optimized away, as I've mentioned before, and neighbor_index_to_diff could be replaced with a lookup table, but those together are at most 10% of the turn time (again, the times above are diluted by loading time). Unit::no_other_action_targeting and Leader::count_workers_assigned_to_tile are slow because they loop over every unit in the game. Tile::impl_m42_Get_Overlays, Map::wrap_horiz, and Tile::has_city are very simple functions that do almost nothing, they appear high on the list because they're called from everywhere. One funny one is Leader::give_map_knowledge which transfers revealed tiles from one player to another after maps have been traded. Over three turns, I had to wait over 6 full seconds for the AIs to trade maps among themselves as they love to do. Leader::impl_m23 is some kind of diplomacy function. City::has_improvement is up there because the game's hash table implementation is terrible.
I'll take a look at the mp_* methods and see if I can decipher how player-player synchronization works as well.
Please do, if you can decode how online sync works, that would be very helpful. That's something I've been wanting to do for years but never got around to. It's probably not even hard, if past experience holds. For years I thought adding additional data to save games might be difficult but it turned out to be no problem. Even lifting the city limit was something I feared would have all sorts of unforeseen issues but the straightforward approach I took worked just fine.
Is there a way to keep the vanilla AI behaviour on founding cities, essentially letting the AI rapidly expand (as would I). I notice that they settle 3-5 large cities and leave wide gaps between other civs, and much of the world is unused.
The mod shouldn't change how quickly the AI founds cities or how many it founds except by the AI settler perfume option you mentioned. That option was added in version 23 and is definitely normally there in the default config INI. It's intended to be used to slow AI expansion though you could use it the other way around. That would create a feedback loop, however, as the AI founding cities would trigger it to build more settlers and having more settlers would cause it to found more cities. I've never tried that so I don't know how bad it would be in practice. Worst case scenario is every AI builds nothing but settlers until the map is full.
Did you notice the AI settling change after you altered one of the mod options, or do you think it was simply running the mod that caused that?