OperationMethodInfoCache question

edited July 2010 in Photon Server
I notice in the MMO Demo server that you create a single instance of OperationMethodInfoCache and keep it around for the lifetime of the application. To me, this implies that construction of OperationMethodInfoCache objects is expensive. Is this the case?

For example, if I created one for each Peer (even though the registered functions do not change for each instance) is this expensive? What are the implications of this for a heavy amount of peers?

Comments

  • BorisBoris ✭✭
    The expensive part is the reflection work being done at RegisterOperations().
    The more often you call this method the more CPU your server will use and this reduces the maximum number of concurrent peers your server can handle.
  • Thanks; this confirms my suspicions.
Sign In or Register to comment.