Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
less sync-ing with thread registration #5474
... here's an interesting find while trying to upgrade an app stuck on JRuby 1.7.4
the app uses celluloid's actor model and under load degraded considerably (~ 10x).
now, that locking shouldn't be needed since the backing map is already a synchronized collection.
... poked around history and there's no explicit reason for
have patched this on top of of 188.8.131.52 and put under load - the 10x degradation was gone and all seems good, so far. still could use a review whether I did not miss anything.
also how would you guys feel about backporting to 9.1, assuming there's going to be a 184.108.40.206 ?
headius left a comment
These changes look good to me. I don't see a problem with removing the synchronization.
FWIW I did look through history to figure out when these were added, and they go way back to 2005 when I was first reworking JRuby's runtime internal. It looks like it was overcautious then too, since the state changes are similar: d2c051a
also dug around and find old (similar) commits, think from Nick. did hope to find smt explicit where these were introduced for a concrete reason but there seems to be nothing relevant except being cautious.