GAE datastore, poor performance

Hi all,

First off I want to say I really like the idea of vaadin, the Java only idea as well as making it as desktop like as possible. However, at the moment I am a bit frustrated and I was hoping I could get some advice. I implemented the address book application in GAE using the datastore and the GAEcontainer. It seems like my version isn’t working very well so maybe its something stupid I did. I will admit I just replaced stuff with the GAEcontainer, and fiddled around until I stopped seeing errors. There wasn’t a whole lot of understanding occuring.


A version someone else did, it seems to work fine, load up ok and whatnot

My version of the address book done in GAE

my version take ages to update when you scroll. Sometimes when you scroll and select, it will unselect itself.

I am using the GAEContainer, and I already have a list of 103 type “Person” in the datastore.

Here are the only real changes I did. It seems odd that I have to add those container properties on every load up, but that is the only way I could get it to work with the table


import java.util.Random;


import fi.abo.GAEContainer.impl.DatastoreImpl;
import fi.abo.GAEContainer.impl.GAEContainer;

public class PersonContainer extends GAEContainer implements
		Serializable {

	 * Natural property order for Person bean. Used in tables and forms.
	public static final Object[] NATURAL_COL_ORDER = new Object[]
			"firstName", "lastName", "email", "phoneNumber", "streetAddress",
			"postalCode", "city" };

	 * "Human readable" captions for properties in same order as in
	public static final String[] COL_HEADERS_ENGLISH = new String[]
			"First name", "Last name", "Email", "Phone number",
			"Street Address", "Postal Code", "City" };

	public PersonContainer() throws InstantiationException,
			IllegalAccessException {

	public static PersonContainer createWithTestData() {
		PersonContainer c = null;
		try {
			    c = new PersonContainer();

				c.addContainerProperty("firstName", java.lang.String.class, "");
				c.addContainerProperty("lastName", java.lang.String.class, "");
				c.addContainerProperty("city", java.lang.String.class, "");
				c.addContainerProperty("email", java.lang.String.class, "");
				c.addContainerProperty("phoneNumber", java.lang.String.class, "");
				c.addContainerProperty("streetAddress", java.lang.String.class, "");
				c.addContainerProperty("postalCode", java.lang.String.class, "");

			} catch (InstantiationException e) {
			// TODO Auto-generated catch block
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block

		return c;

Any ideas?

GAE reports pretty heavy cpu usage, which you would expect for the delay.

After looking at it a bit more it seems like maybe my performance is how GAEcontainer works,, is the sample app for the container. If you drag that around its pretty similiar to mine.

That is really not very good for just a simple app, and I wouldn’t want to build something complex using GAEcontainer then. Should I expect it to work better if I directly use the google datastore methods?

So I built the same tutorial using the gaedatastorecontainers, also in the addons directory:

Just compare how much faster that is to the one using GAEcontainer

In both cases I just went for the most direct integration of the addon into the addressbook demo. It is quite clear which one I am going to start a project on. I still don’t really understand what the difference is due to though.

As another note, I believe I have memcache turned off for both of them, so this is an apples to apples comparision

I do not know the implementations, but could it be that one of the implementations loads all the data lazily while the other caches it in memory (not necessarily in memcached as you pointed out)? That would explain the performance difference. Could the situation be completely different if the dataset would be larger?

Thanks for your response. I wasn’t able to figure it out, but it was a moot point because I wasn’t getting very good preformance on GAE overall.

Thanks again though for trying to answer, I think it says a lot positive when the head guy at a company spends his time helping newbies