I suspect that that the leaders are not sorted (unless you do it manually) so they are probably ordered the same way as their entries in XML.
Problem is I'm using separate leader XML's for each civilization, so I'm guessing I'm screwed.
Regarding order, the game does the same for all xml files meaning what I write here applies to units, buildings and so on as well as leaders. At runtime the game has one ordered list. If the order matter to the game or not depends entirely on the game, but the xml loading code makes an ordered list for each file.
The order is simple: whenever a new leader is read, it will add that leader to the end of the list. It starts by reading the main file (not a module. Will read vanilla if none is supplied). Here it will read the leaders in the order they are written.
Modules are then read and I
think they are read alphabetically based on their path names. In each file it adds leaders in the order they are written.
This means "American leaders.xml" will be read before "British Leaders" even if the first leader's name is Washington and the next is Alfred the Great. It's the filename, not the leader name, which matters. At least that's how I remember the code. I didn't actually look it up right now.
There is one exception to this rule. If Type is already in use, the new leader will replace the old one using the same Type string. This will allow you to reuse vanilla leaders and only replace a single one if you like. The same applies to units and all that. Be careful though. It doesn't check if the Type you enter is for the correct file. If you write the 4th building class type and you add a building, it will overwrite the 4th building regardless of which type it has. I once spent ages searching for a vanishing unit due to a bug of this nature.
Another question I have is can it affect performance using multiple XMLs via Modular loading instead of having all information in one XML?
If so what method is better for performance?
What matters to performance while playing is the final list. If it's 10 files with one leader in each or one file with 10 leaders doesn't matter because it will result in the same single list in the game with 10 leaders.
What does matter for performance is the fact that the game scans all files at startup, which is why it can take minutes to load a mod. However it seems time spend scanning xml files is insignificant compared to scanning graphic files. If you worry about startup times, you should keep your custom graphics at a minimum. That will matter perhaps thousands of times more than the number of xml files.
And even the number of graphic files seems unrelated to game performance once you have reached the main menu. That too is purely a startup time issue.