Hi,
1. I recommend using the same key_name based on your logical pkey for all of
those related models. Then you can generate keys for which data you need and
get the parts you want all at once.  Not sure what your performance benefit
expectation can be.

2. If you put the entity again it should overwrite the old unused properties
and keep them from being transfered over the wire.

On Sat, Oct 10, 2009 at 5:53 AM, Jason Smith <[email protected]>wrote:

>
> If you're into SO, I have posted this question there, slightly better
> edited and formatted. I will summarize any good answers there in this
> list.
>
>
> http://stackoverflow.com/questions/1547750/improve-app-engine-performance-by-reducing-entity-size
>
> On Oct 10, 6:44 pm, Jason Smith <[email protected]> wrote:
> > Hi, group. My app's main cost (in dollars and response time) is in the
> > db.get([list, of, keys, here]) call in some very high-trafficked code.
> > I want to pare down the size of that model to the bare minimum with
> > the hope of reducing the time and CPU fee for this very common
> > activity. Many users who are experiencing growth in the app popularity
> > probably have this objective as well.
> >
> > I have two questions that hopefully others are thinking about too.
> >
> > 1. Can I expect the API time of a db.get() with several hundred keys
> > to reduce roughly linearly as I reduce the size of the entity?
> > Currently the entity has the following data attached: 9 String, 9
> > Boolean, 8 Integer, 1 GeoPt, 2 DateTime, 1 Text (avg size ~100 bytes
> > FWIW), 1 Reference, 1 StringList (avg size 500 bytes). The goal is to
> > move the vast majority of this data to related classes so that the
> > core fetch of the main model will be quick.
> >
> > 2. If I do not change the name of the entity (i.e. just delete all the
> > db.*Property definitions in the model), will I still incur the same
> > high cost fetching existing entities? The documentation says that all
> > properties of a model are fetched simultaneously. Will the old
> > unneeded properties still transfer over RPC on my dime and while users
> > wait? In other words: if I want to reduce the size of my entities, is
> > it necessary to migrate the old entities to ones with the new
> > definition? If so, is it sufficient to re-put() the entity, or must I
> > save under a wholly new key?
> >
> > Thanks very much to anyone who knows about this matter!
> >
>


-- 
Kevin Pierce
Software Architect
VendAsta Technologies Inc.
[email protected]
(306)955.5512 ext 103
www.vendasta.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to