> That makes absolutely no sense. The app doesn't cache data in instances; > there's utterly no point to using weak references.
Your app runs for multiple seconds, you get garbage collection in that time and since you also feel no need to destroy objects you aren't using... this would be a lazy way to deal with it. > "this" + "that" is compiler syntactic sugar for using a StringBuilder to assemble > the string. There is no difference between the two. It's probable that I could > do the same trick I did with imports and create with two classes that > generate identical bytecodes, but figuring out the exact pattern is more > effort than I care to spend at the moment. No, the intermediary objects are different and you have a much larger memory foot print using loops with + than stringbuilder For Print "this" + "that" you are essentially correct, but for 1000+ loops the difference is huge. Typically for small stuff it isn't worth messing with but you have some long loops of this. > > Also, never use StringBuffer; it's a legacy class from JDK 1.0 which > unnecessarily synchronizes method calls. StringBuilder is the replacement. > Yes I misspoke. I have been up for 48 hours and would be sleeping except someone said I couldn't do hello world in 1.5 seconds and I missed it by 100ms on an F1, so I didn't want to be slow getting response to this. > > You do a lot of .Trim when you should use Vector > > I'm genuinely afraid to ask, but... huh? Vector? (!!!) Vector resizes an object without creating an intermediary or placeholder object, so there is nothing for garbage collection to deal with, and you don't have to create a new object which gets renamed to the old object. (which is what trim does) Again a Pain in the ass for doing a trim on something once, but when you have it in a for loop it adds up. -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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?hl=en.
