nearinfinity/node-java — pull request #81 by inolen (2013-11-08 17:57:33+00:00)
Title: don't repeatedly attach / detach worker pool threads

While profiling node-java, I noticed one bottleneck was the Attach/DetachCurrentThread block.

As far as I can tell, there is _no_ advantage to constantly attach and detach. Being that libuv maintains a constant set of worker threads, it doesn't seem there is any need to always perform this action.

In my use case, this sped up processing of async operations by a double digit percentage (somewhere around 20-30%).