Kapil Pendse
unread,May 18, 2012, 3:55:00 PM5/18/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to javageomodel-discuss
Hi Everyone,
I'm using javageomodel in my project on GAE. I have a set of entities
in the datastore that need to be queried quite often, to check
proximity around a point.
This set of entities changes rarely, usually only once a day, whereas
the search point changes all the time.
The maximum search results are limited to 16, but as the application's
user base grows, the total entities in the set is expected to grow a
lot.
So I'm looking at doing a proximity search on let's say 100,000
entities, with the result limited to a maximum of 16.
Right now my proximity search function call takes about 300~500ms to
complete.
I am looking to optimize this to reduce the processing time and my
questions are:
1) If I want to search through the GAE memcache, is the
GeocellQueryEngine.query() [or JDOGeocellQueryEngine.query()] the
single point where I can insert by caching code? Something like:
if( entity list present in memcache ) {
proximity search through the cached list
}
else {
fetch list from datastore
add to cache
proximity search through the cached list
}
2) The existing query function fires a query on datastore with filters
on geocells. The filtering is taken care of by the datastore engine.
But if I implement the above, I will have a list of unfiltered but
cached entities in memcache, and I will probably loop through this
list to filter by geocells. So, how much speedup can I realistically
expect, if at all?
Thank you very much,
Kapil