• Post Reply Bookmark Topic Watch Topic
  • New Topic

Isn't a Griffon application too slow to run?  RSS feed

 
Rogerio Kioshi
Ranch Hand
Posts: 690
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is Griffon too slow when running, or this is because of Swing?
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you actually find it slow, or are you just guessing? Any Swing application that's slow is probably just badly coded.
 
Fredrik Johansson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I asked a similar question. See http://www.coderanch.com/t/549501/GUI/java/Griffon-user-interface-responsiveness-compared.

Fredrik
 
Andres Almiray
author
Ranch Hand
Posts: 47
Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too slow to do what exactly? Is it because of the choice of Groovy as glue language?
I'm happy to say that the answer is no. Most of the Griffon runtime is written in Java, which means that the inner workings are as fast as your vanilla Java framework. There are parts of the code that use Groovy APIs, most of those APIs happen to be written in Java too.

Does this mean Griffon is as fast as a Java framework? No, it is not, but it's definitely not as slow as you might think. If you write MVC members in Groovy then you're subject to the Meta Object protocol, i.e, dynamic method dispatch. What happens is that instead of getting a direct method invocation you follow (automatically) a more elaborate decision tree to find out the right method to invoke. This is where the "slowness" of Groovy appears. In practice Groovy code can be +50% slow than Java, which only comes into play if you're doing computation intensive tasks like number crunching as most of the times the responsiveness of an application is measured by its weakest link: I/O.

Cheers,
Andres
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!