sirikata / sirikata

Sirikata is a BSD-licensed platform for networked 3d environments
http://www.sirikata.com/
Other
126 stars 39 forks source link

Excessive number of threads allocated for HostedObject transfer pools #505

Closed ewencp closed 12 years ago

ewencp commented 12 years ago

dd687ed6d6cfb7e914c0a93e12a050c105d6db08 added a TransferPool to HostedObject. Each TransferPool currently allocates a thread, so we now are allocating 1 thread per object. This is expensive and probably won't scale past a few hundred objects.

Not sure if the right fix is to make one TransferPool per ObjectHost for downloading the zernike descriptors or if we should change TransferPool so it doesn't require its own thread. @jterrace and @tahirazim probably need to figure out which is the right fix and who needs to fix it.

jterrace commented 12 years ago

The original design of TransferPool was to have one per subsystem, e.g. audio, physics, graphics, scripting, so it definitely shouldn't be one per HostedObject. Could this be moved to ObjectHost and accessed via HostedObject?

tahirazim commented 12 years ago

Yes, I'm making the change now. Since TransferMediator is a singleton, I had the impression that there was a single thread allocated for transfer pools per process.

tahirazim commented 12 years ago

Fixed in commit 09d4ad43831f9d0cdfb359f55a5cc639d299499d