Vaadin Benchmarks


Today I had the chance to make a competing implementation based on Vaadin. The production implementation to compete with was a Primefaces bases webApp.

I just did i quick-test - results below:

  1. CPU usage: Vaadin at least 50% less
  2. Code quality improvement: at least factor three using Vaadin (okay, personal taste in some ways)
  3. Code reduction: at least 4 times less (if not muchm, much more…) using Vaadin

I love it!

Sounds great, would be interesting to get the codes in order to do some comparison by myself. Or if it’s closed source, it would be interesting to get some data based on formalized metrics - we would then just trust your measurements :wink:

Yes - closed source unfortunately.
What metrics would you like to see - maybe I can investigate a little more on that. As Vaadin really lacks performance comparisons I am personally very interested in that by myself.

I was basically running some manual test like this:
0) Application is a EJB/JPA based application, so both Primefaces UI and Vaadin UI fetch data via the same EJB stack.

  1. The application actually is deployed as one war file, with both UIs contained, so both actually pick up data from the same memory
  2. The server is a standalone Debian just serving that application (which means those two UIs), I have been the only user on that system under testing, and checked the CPU usage using the top command on the box directly

I would like to see some data regarding CPU- and Memory-usage on both server and client. We have lots of thin-clients and virtualized client-proxies running here, so it’s interesting how much memory and CPU is actually needed by the client to run the JS-code. Code-reduction could be easily measured by LOC, for code-quality … well alone that I do not have to deal with HTML, Javascript and XML for myself (most of the time) is an improvement for me ;).

Eventually you could even try to do a performance-comparison regarding render-times … - maybe using Firebug?

Good point. I will try to track rendering times/CPU usage on the client side in addition!

Will try that one on both client and server side:


I dont know if our Primefaces project just is sluggish and crappy implemented - as I am not a Primefaces expert (and I dont want to get one either), so we have to take this as it is. But as written before: You CANT implement RIA webApps with less LOC in Java as you do with Vaadin in my opinion - prove me that I am wrong :slight_smile:

I had no luck today: struggeled on getting Vaadin table filled with items as posted over here:
fill items issues

So I just reached to make a CPU usage capture sample, when clicking sporadically through the two implementations:

When I get the table issues resolved I will make a cpu sample on client side - I promise :slight_smile: But currently I am a quite disappointed concerning the performance of the Vaadin table for lists with more than 1000 items…

So yes, the fill items issue currently is definitely a showstopper and so a reason for not using Vaadin: Loading the pages (containing tables with more than 1000 items) is too slow in this way.

Here is another old, but very open, comparison between Vaadin (called IT Mill Toolkit back then) and ICEFaces:

Conclusion there was that number of code-lines for Vaadin version were just 50% of the code-lines of the JSF version and Vaadin version took just 40% of the time to implement when compared to JSF version. Both versions were implemented by the same person that had no previous experience on either technologies. Configuration files or backend logic were not counted at all.

Well done - thanks for linking that one here, I do agree with the benchmark. Lacks performance benchmarks of course, but anyway - pretty well done analysis focussing development costs/techniques.

Joonas i would pretty much appreciate a coding sample on how to link an existing EJB layer properly to a Vaadin UI, as also posted over here:
fill items issue

I think as replacing the UI implementation (to Vaadin of course) is a pretty general use-case, maybe Vaadin could write an article or blog post on that.


I’m no Joonas, but I’ve been using EJBs with Vaadin for a while now. I believe the simplest way (no CDI involved) is to inject EJBs into your application servlet and pass them to the application object constructor. In
this blog about a Vaadin sample app
, you can see an example of this in use.
Here is the servlet class

Then, in your Vaadin app, you just make calls on the EJB as if it were any other object. Under the covers, any handle an app has to an EJB is really to an object managed by the container that wraps calls to the real pool of EJBs. So it’s ok to hang onto this object, serialize it, whatever, that might happen in a web application.


Thank you. I have my beans in the Vaadin app. Which is okay.
My problem is how to put the EJB data into a Container supporting lazy loading. Doing that manually, by looping over my EJB lists is way to slow for lists having more than 1000 items. An in my understanding, lazy-loading is actually there to prevent from “loading” all data all the time. Lazy-Loading just needs the length of a list, and index and an offsett to show just the relevant items at a time - but I have no clue on how to accomplish that.

Any ideas?

I believe the slowness issue was resolved in
this thread
. Batching of fetches and using a custom container might help some more.

So, as promised: Issues resolved and here comes the final benchmark, Vaadin vs. Primefaces.
Benchmark based on CPU, both server- (Debian) and client-side (Mac OS/Safari):