Brian, in many cases it is changing the indexes that is expensive. Entities
are stored in a distributed key-value store, so a single write or delete is
cheap, but since we have to update the indexes synchronously, that could be
where you are paying the cost. For operations where you do not require
synchronicity, that is, where you can assume a write happened, you may want
to defer a large write operation to the Task Queue so you can return output
to the user quickly.

On Wed, Dec 16, 2009 at 11:36 PM, Brian Hayward <bhayw...@gmail.com> wrote:

> I added items one at a time until I got to 30, then I did the empty,
> so I'm pretty sure it wasn't a load request, this is normal.
> Child entities have 4 fields with one being a list of Strings.
> There is one index and it is 9% of the overall space.
>
> Thanks,
> Brian
>
>
> On Thu, Dec 17, 2009 at 1:25 AM, Richard <richard.wat...@gmail.com> wrote:
> > It's probably that expensive. There are many surprises when using the
> > datastore! I'd really like to get to grips with exactly what is
> > causing what performance issues because it still feels a bit
> > uncharted.
> >
> > Possibilities:
> > Check if this speeds up if you call it a number of times in a row.
> > Your app might have to load. I'm finding that it unloads very quickly
> > now - a few minutes, whereas it seemed to take up to 20 min before. I
> > also feel like repeated calls of a similar kind seem to run faster.
> > When I turn logging onto "Info" level, I see a few exceptions when
> > some parts wake up, like queues. Those don't happen after the first
> > call.
> >
> > How many 'columns' do your children have? Each of those have to be
> > indexed. You can specify that the datastore ignores some columns for
> > indexing. Do your children have list properties? If so, that expands
> > the indexes a lot.  Look at your data stats to see how much indexes
> > are taking up compared to data, which should hint at how much the
> > store is doing behind the scenes.
> >
> > Regards,
> > Richard
> >
> > On Dec 17, 7:40 am, Brian Hayward <bhayw...@gmail.com> wrote:
> >> Am I doing something wrong here?
> >>
> >> Parent class with an owned one-to-many relationship containing 30
> >> children. calling clear() on the collection and then makePersistent()
> >> on the parent was:
> >>
> >> 1646ms 5065cpu_ms 4560api_cpu_ms
> >>
> >> Is it really this expensive?  I have timing around the above two
> >> steps, my logs reported that part alone as 1552ms.
> >>
> >> Thanks,
> >> Brian
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> > To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
> >
> >
> >
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.


Reply via email to