views:

79

answers:

3

Here is the situation: I had an app with a cold start time of about 4 seconds. I was trying to improve the cold start time by removing a bunch of libraries and code I didn't really need. After doing that the cold start time was about 3 seconds latency, and 3 seconds CPU time used.

I changed the version number in appengine-web.xml, and nothing else. And now I have two versions of my app that have the exact same code, up and running.

For cold starts, the newer version uses 1800ms to 1900ms in CPU time.

For cold starts, the older version uses 2400ms to 3000ms in CPU time.

The exact same jsp page from each version is requested to test the cold start time. So far I have sampled 7 cold starts for each version.

A: 

Sounds like a fluke, I don't see how changing the version number of your program could generate a change in speed. Unless there was a coincidental library update or some such.

Mimisbrunnr
Exact same code and libraries used, however the old version I had been developing on for over a month. Maybe old libraries aren't cleaned up completely or something when you upload your app?
Kyle
That's possible, I'd take both code basses, then guarantee they are running off the same libraries on the same machine and run some more testing. Something is obviously different because of the speed shift, but I still doubt it's version number.
Mimisbrunnr
A: 

Could the version number be changing an execution path somewhere? Perhaps in the XML parser or data binding that happens before your app is running?

Chris Nava
A: 

hmmm, I think it is possible that there is some kind of caching of the look of your application, since gae upload is basically differential update (you send only changed files).

If you posted many changes on one version id, it is possible that GAE has many snapshots of your code.

Thus, if you do big changes (this is my rule of thumb) you should always change the version of your application, just to be sure. Additional commits I use only for bug fixes, never for big refactorings/adding or removing JARs. I think you also at that point you have new logs and simply "refreshing installation" of your application so GAE can do some optimizations...

Agree?

MilanAleksic