It might be helpful to see the entire trace for a series of runs. Is the app only slow after a period of not being used? If so, have you looked into the possibility that the app is being swapped out, and so the JVM is being re-created and spun up for the next call?
On May 27, 4:20 am, Ice13ill <[email protected]> wrote: > Well, for me it's kinda strange, because i think i don't really > understand what's going on... > Let's say I want to get all my documents using gdata for docs list > (just an example). So, first I call getUserCredentials() (which makes > a query to datastore to get parameters: 31 ms) then an url_fetch (for > gdata: 50ms) and then another query to get other docs from datastore > (40ms) (app stats). > What i don't understand is this: > - first query is made after about 2500 ms > - between first call (first datastore query) and the second call (url > fetch) there are about 900 ms, 500ms between second and third > - RPC total: 121 ms (sum of those 3 calls), Grand total : 4000 ms > > I don't understand those large gaps. Am I reading it wrong ? > > So I don't think the call to UserServiceFactory.getUserService() is > long taking... It's like the my session enters a sleep state if i > don't use the app for about 2-3 minutes (can this be related to > <session-enabled> ?). > > On May 26, 11:36 pm, Mike <[email protected]> wrote: > > > > > Some questions: > > > 1) Did you run the server trace on your code to see what was slow? > > > 2) One idea -- rather than calling UserServiceFactory.getUserService() > > every time in the servlet -- why not hang onto that in the Servlet > > (say, by doing that once in the constructor) and using it over and > > over (so long as the Servlet is long-lived, all subsequent calls will > > be much faster). > > > 3) What have you tried, and what are you seeing? > > > Cheers > > Mike > > > On May 25, 5:18 am, Ice13ill <[email protected]> wrote: > > > > I'm building an app that uses Google account auth. > > > The application also uses a custom persistent entity (UserProfile) for > > > users that are registered (so basically there are functionalities that > > > can be used for free and others by registering). > > > At the beginning, the app was simple, so at every request the user was > > > checked by calling .getUserService().getCurrentUser() (including at > > > first login obviously). But it seams that a call to that method can > > > sometimes take about 3-5 seconds and also, clearly it is not he best > > > way. > > > So I need some advice implementing the session part, using what is > > > described in the appengine documentation (session-enable + memcache + > > > etc) . It does'n seem hard, but I know that some hints&tips could help > > > me at the beginning. > > > Thanks. > > > > -- > > > 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 > > > [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > For more options, visit this group > > > athttp://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 [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-java?hl=en.
