Vaadin framework response time on GAE


First of all look at the attached image please.

There is a lot of time being expend before my code begins. Is this vaadin framework time? is it normal?

The time between requestStart and requestEnd is:
CPU:0.008333333333333333 // API CPU: 0.008333333333333333

The logs of Appengine tell me that the total time was 853ms.

I supose that the lines 1,2,5 and 6 is integration code between vaadin and GAE (this seems normal to me), and lines 3 and 4 are my code lines (RPC calls). But i don’t know what is doing between lines 2 and 3. I supose that is time being expend in logic layer, but my code starts at line 3 with a RPC call in public void onRequestStart(HttpServletRequest request,HttpServletResponse response) .

Any ideas?


I believe this is because GAE for Java serializes the session at the end of every request and deserializes it (possibly on another computer on the other side of the world) at the beginning of every request. This does not only hurt Vaadin but all applications that keep data in the session on the server - but Vaadin sessions tend to be a little bigger than those of some trivial applications and so the effect is more visible.

We and others have requested the GAE team to support sticky sessions (keeping the session on the same computer when feasible, avoiding at least the deserialization overhead most of the time), but I believe it has not been implemented yet.

Ok, thanks a lot Henri, it was making me crazy trying to understand the problem.

Hi again Henri,

Looking at GAE documentation i have found the resident backends configuration for java, it has a comparative between dynamic instances and the resident instances, and says this:


  • Resident Backends: Preserved until manually shut down, or until an unexpected shutdown event takes place. See Shutdown for more details on shutdown events.
  • Default (dynamic): Erased when the backend is shutdown after sitting idle for a few minutes.

Can this solve the problem? This feature was added in the last version (1.5.0) of the SDK.

I haven’t said anything, that feature doesn’t solve the problem, it seems that it is only for long requests.