Hmm... Good point. The file handling my index page actually has a lot of imports to other pages. Like a main entry script for several pages. If Python loads all the imports, even when they are not used, then unused imports create an unnecessary overhead. I will move those imports to a separate file.
On Feb 21, 3:57 pm, Takashi Matsuo <matsuo.taka...@gmail.com> wrote: > Please make sure that your app doesn't load all the views on the > memory when your index page is accessed. > Loading all the views in your memory at startup will cause very long > cold startup time. > > Perhaps you can use profiling for detecting what is the bottleneck. > > AFAIC, 10 secs cold-start is too long for any appengine/python application. > > -- > Takashi Matsuo > Kay's daddy > > On Sun, Feb 21, 2010 at 10:30 PM, Anders <i...@blabline.com> wrote: > > Yes, it's the complete cold start I mean. Rarely nowadays the cold > > start time is as much as 10 seconds for me, but occasionally it's > > several seconds too long. Maybe it doesn't happen so frequently as to > > be a real problem, but it's still frustrating when suddenly the index > > page loads like some overbloated dot com site from the late 90s. > > > On Feb 21, 11:03 am, Tim Hoffman <zutes...@gmail.com> wrote: > >> HI > > >> If you don't need to start the django stack to serve a page from cache > >> then you should be able to deliver a page from a warm instance in > >> 20-40ms > >> and if you need to start an instance and only import memcache and > >> retrieve the cached page you are looking at about 200ms. > > >> I am doing this on a number of sites (don't use django but use bfg, > >> but a complete cold start with nothing in cache > >> is typically around 8-10 seconds. And even the main page is made up > >> of many cachable bits) so its really rare > >> we ever have to deal with a full stack startup with nothing in cache. > > >> T > > >> On Feb 21, 10:54 am, Anders <i...@blabline.com> wrote: > > >> > I doubt that replacing calls to Django with calls to memcache would > >> > improve the cold start time significantly, although I could be wrong. > >> > What I guess happens in a cold start is that the application code has > >> > to be loaded through the network into a server and then instantiated > >> > before serving a webpage. Using the memcache would then not improve > >> > the initial loading of applications. Only if Django is taking a long > >> > time to load during a cold start would the use of memcache make much > >> > difference. > > >> > On Feb 21, 3:37 am, Eli Jones <eli.jo...@gmail.com> wrote: > > >> > > I have a testapp set up that I use to see if any goofy ideas I come up > >> > > with > >> > > have any merit. > > >> > > So you could try to create a simplified version of your page that used > >> > > the > >> > > same imports and django templates as the live one. Then create two > >> > > different test pages.. one where you experiment with caching different > >> > > things.. and then try to compare the cold start times. > > >> > > On Sat, Feb 20, 2010 at 9:32 PM, Anders <i...@blabline.com> wrote: > >> > > > Strange, I don't see the preview release notice on > >> > > > appengine.google.com any longer. So I assumed that GAE was no longer > >> > > > in preview release version. And on the SDK download page it now says: > >> > > > "Please note: The App Engine SDK is under active development, please > >> > > > keep this in mind as you explore its capabilities." > > >> > > > I guess I could cache the html generated by Django, at least for the > >> > > > index page, if that library is more heavy to load than the Memcache > >> > > > API. I don't know exactly how Python works, but shouldn't it be > >> > > > possible for GAE to always have the standard frameworks always loaded > >> > > > into memory for all applications to share? > > >> > > > On Feb 21, 3:17 am, Eli Jones <eli.jo...@gmail.com> wrote: > >> > > > > First, when I log into appengine.google.com, it still says "this > >> > > > > is a > >> > > > > preview release" with the "preview release" part being in bright > >> > > > > red > >> > > > > letters... so.. take that to mean what you want. > > >> > > > > Second, you haven't mentioned what exactly the code for your index > >> > > > > page > >> > > > > does? What is it loading? How much caching are you doing? > > >> > > > > Caching isn't just for entities from the datastore.. you can and > >> > > > > should > >> > > > also > >> > > > > cache html or page templates or whatever else you can.. Also, you > >> > > > shouldn't > >> > > > > dump a bunch of imports at the top of your code.. only import > >> > > > > specific > >> > > > > modules as needed within the code. > > >> > > > > Though, it's hard to make suggestions without knowing exactly how > >> > > > > your > >> > > > code > >> > > > > works. (You may be doing all of the above things.. or feel like > >> > > > > you are > >> > > > > doing them.) > > >> > > > > A lot of the annoying restrictions that people complain about, to > >> > > > > me, are > >> > > > > inherent limitations to having a highly scalable infrastructure.. > >> > > > > the > >> > > > > restrictions are there to force you to learn to code (from the > >> > > > > beginning) > >> > > > > for the App Engine environment. > > >> > > > > Granted, your issue may just be with intermittent but slow cold > >> > > > > start > >> > > > > times.. is the cold start reasonable in general for you.. > >> > > > > but occasionally hits that frustrating point? (Again, hard to know > >> > > > anything > >> > > > > without knowing how your code is structured.) > > >> > > > > On Sat, Feb 20, 2010 at 8:59 PM, Anders <i...@blabline.com> wrote: > >> > > > > > I'm using Python. And only Python's standard library that's in > >> > > > > > GAE. My > >> > > > > > guess is that the cold start problem is similar in the Java > >> > > > > > version. > > >> > > > > > The cold start time has improved but now and then loading the > >> > > > > > index > >> > > > > > page takes frustratingly long time. That's poor quality for both > >> > > > > > end > >> > > > > > users and developers. > > >> > > > > > On Feb 20, 7:21 pm, Brandon Thomson <gra...@gmail.com> wrote: > >> > > > > > > Are you using python or java? what is your framework? > > >> > > > > > > On Feb 20, 1:26 am, Anders <i...@blabline.com> wrote: > > >> > > > > > > > This has been discussed before but the problem still > >> > > > > > > > remains. It > >> > > > seems > >> > > > > > > > that GAE is no longer in a preview release version (as far > >> > > > > > > > as I can > >> > > > > > > > see). Having a cold start initiation time of 10 seconds is a > >> > > > > > > > major > >> > > > > > > > bottleneck. > > >> > > > > > > > Imagine if it took 10 seconds to load for example the Google > >> > > > > > > > Search > >> > > > > > > > index page in your browser. It doesn't sound like a very > >> > > > > > > > long time, > >> > > > > > > > but today that kind of load time for an index page is very > >> > > > > > > > poor > >> > > > > > > > performance. > > >> > > > > > > > I understand that GAE cannot at the moment hold all > >> > > > > > > > applications > >> > > > hot/ > >> > > > > > > > warm, because that would require a lot more resources I > >> > > > > > > > assume. But > >> > > > I > >> > > > > > > > think the cold start time needs to be brought down to a > >> > > > > > > > maximum of > >> > > > > > > > around 2 seconds. > > >> > > > > > > > It actually doesn't matter in many cases if an application > >> > > > > > > > is used > >> > > > by > >> > > > > > > > millions of users every day or only seldom by a few people. > >> > > > > > > > The > >> > > > load > >> > > > > > > > time for webpages is usually extremely important regardless > >> > > > > > > > the > >> > > > amount > >> > > > > > > > of traffic to a website. Each user's experience counts. > > >> > > > > > -- > >> > > > > > You received this message because you are subscribed to the > >> > > > > > Google > >> > > > Groups > >> > > > > > "Google App Engine" group. > >> > > > > > To post to this group, send email to > >> > > > > > google-appengine@googlegroups.com > >> > > > . > >> > > > > > To unsubscribe from this group, send email to > >> > > > > > google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> > >> > > > <google-appengine%2bunsubscr...@googlegroups.com<google-appengine%252bunsubscr...@googlegroups.com> > > >> > > > > > . > >> > > > > > For more options, visit this group at > >> > > > > >http://groups.google.com/group/google-appengine?hl=en. > > >> > > > -- > >> > > > You received this message because you are subscribed to the Google > >> > > > Groups > >> > > > "Google App Engine" group. > >> > > > To post to this group, send email to > >> > > > google-appeng...@googlegroups.com. > >> > > > To unsubscribe from this group, send email to > >> > > > google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> > >> > > > . > >> > > > For more options, visit this group at > >> > > >http://groups.google.com/group/google-appengine?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine" group. > > To post to this group, send email to google-appeng...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.