>the same problem like separating end points into micro apps - complex business code doesn't work that way - you have to load all that stuff anyway.
First, but not all at once. Which I addressed in Lazy Load, but since you are still attacking the micro-app / API model This sample app has a “Places” that is the slowest part of the code, and loads things nothing else uses. Spinning that off to an API handled by a backend would make a HUGE difference. Any functionalized code can be converted to standalone apps, and the overhead is that you have a wrapper, but the advantage is that you have huge memory and caching advantages. So any very slow memory intensive function can be converted to an API especially if it doesn’t need to modify globals. If it does need to modify globals you can do that on return. Say for example you have an imaginary app that does business stuff. Selling stuff and searching stuff. Searching works better the more in instance caching you can do. You might want an F4 just for the memory. And because of the shared memory 128 +128+128+128 doesn’t have the cache hit ratio of 1 512. Because of that an F4 with 100% of its available memory dedicated to caching search info your single purpose F4 could serve as many search requests as 8 F1s. but even when that isn’t the case if your “Idle” is 78 megs, an F2 will still idle at 78, but instead of having 50 megs for cache will have 178. Even better if that is the only place you need a wrapper for the complex queries to the datastore this is the only place you need Factory or Objectify. The selling stuff app is likely the only place you need Crypto libraries and because you want to cache sessions again having more memory in instance dedicated to the task of session management increases your cache hits by orders of magnitude. In both cases reducing the number of imports and the frame works required for both of these “microapps” is going to reduce Cold start time. From: google-appengine@googlegroups.com [mailto:google-appengine@googlegroups.com] On Behalf Of André Pankraz Sent: Tuesday, July 24, 2012 5:25 AM To: google-appengine@googlegroups.com Subject: Re: [google-appengine] Re: Startup time exceeded...on F4?! You should really focus an general architecture of the app for optimizing...havn't looked into the provided example. Your micro-optimizing suggestions for Java ...I think all Java guys are like ROFL now. Star visa Full Imports, String Concatenations in this example visa StringBuilder Really, if I carefully craft line numbers or embed no debug info in classes I can generate byte-identical class files with either import and string style. Import statements are not stored at all in Java class code and this string+string in one expression automatically use the StringBuilder pattern. you can lazy load classes - I just fear you mean something different ;) and it's the same problem like separating end points into micro apps - complex business code doesn't work that way - you have to load all that stuff anyway. Am Dienstag, 24. Juli 2012 09:00:15 UTC+2 schrieb Brandon Wirtz: I like that you use +'s to concat strings, it shows a real lack of experience doing optimizations since that is the very first thing on every list. > System.out.println(new Date() + ":" + new Random().nextInt()); At least most of your code uses objects correctly I didn't find any instances of places you did a type conversion functionally. That is usually one of the lowest hanging fruits, because it creates additional objects, and is a memory hog. -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/iYnYrW5SL2EJ. 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. 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-appengine@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.