Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How efficient it is in case of Multithreading?

 
joseph
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case of MultiThreading and in case of multiple clients in a distributed architecture how efficient it is?
 
Venkat Subramaniam
Author
Ranch Hand
Posts: 109
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Groovy preserves the Java semantics, so it is going to behave just like Java. The only difference or improvement is enhanced API or methods to the Thread class and on Object that make it easier to create thread, etc.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, isn't it also possible that there will be differences in performance? Groovy's more dynamic method dispatching can mean slower performance in some cases. I suspect this is more of an issue in CPU-bound applications, which are fairly rare in this day and age, but they do still exist sometimes. I imagine the usual performance advice still applies - don't worry about it unless and until it's demonstrably a problem, then optimize the part that is actually a bottleneck. In Groovy development, part of that optimization might include rewriting some critical sections in pure Java.

I should also note that none of what I've said is specifically about multithreading - rather it pertains to performance in general. Multithreading in Groovy doesn't seem to introduce any new problems, anyway.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic