> Because Fids are chosen by the client, the server must search in > a table (hash table in lib9p) the associated file structure, Whereas > if Fids are chosen by the server, a simple array is enough. I don't > know however, if the performance improvement is really important. > In fact I'm quite sure it is not.
If Fids were chosen by the server you would have written the opposite. One side can have a simple array lookup and one side can't. It doesn't matter either way. You just pick one. Or you could do what SSH did and pick two: there the equivalent of a "fid" is actually a pair of integers, one chosen by the client and one chosen by the server, so that both can use an array lookup. Because after all the encryption and public key operations, it's really looking up the fids that is eating all the cpu. Russ
