5 ms·
Google AppEngine – Java vs Python Performance Comparison
- grandalf 17y agoI love app engine and if it had SSL I'd use it for all projects I do ... BUT: It feels odd to run the speed analysis tool in google webmaster tools and discover that my very simple site is slower than 80% of the sites on the internet... I use python, btw, so it's still fairly fast, but for some reason even the simplest pages (one datastore request by key and a simple template) are still not "fast" compared to the rest of the internet.
- bad_user 17y agoThis is because in Java land startup speed isn't viewed as something important. Groovy also has the poorest runtime IMHO. JRuby or Clojure are in a better shape.
- Estragon 17y agoI'm confused. Why isn't scala also affected by the loading-time issue? It's running on top of the JVM, too...
- rortian 17y agoIt's not apples to apples. They are totally different tasks and frameworks. They are probably having the same issue Rails 2.x has on it. Each request needs to have several libraries loaded. Scala is probably just using servlets fairly directly which entails a minimal spin up time.
- Estragon 17y agoI see, so it's not the JVM loading time, so much as library loading time. Interesting. I would have thought that would hit python even harder.
- gte910h 17y agoI was under the impression that Java was faster (even in startup time)...wow. Hope this summary is correct, as I didn't have plans to swap to the java ecosystem.
- tuxychandru 17y agoJVM is the slowest runtime in terms of startup. But it does run way faster once it has run for enough time and has profiled and optimized a good portion of your application. In most cases where Java is used on the server, it is expected to startup once and continue running for a long time and host multiple applications. In this JVM's startup becomes a non-issue and its optimizations become a huge benefit.
- ks 17y agoI agree. And it is also not a real benchmark since it obviously tests different types of applications.
- j_baker 17y agoHere's a very good explanation of why python performance is faster than java on GAE: http://stackoverflow.com/questions/1085898/choosing-java-vs-python-on-google-app-engine/1087878#1087878 http://stackoverflow.com/questions/1085898/choosing-java-vs-...
- rortian 17y agoI hope you don't think this site demonstrated this. The python site was a proxy. The java/scala websites did more than trivial things.
- j_baker 17y agoOf course not. But it's helpful to know that information when you're comparing python to java on GAE regardless.
- rortian 17y agoAlright but for your information that post is almost a year old and GAE/J is now much more mature. IMO, a developer should just use what they are more comfortable with. Sadly, it looks like the groovy framework has not been tweaked to work well on GAE.
- toddh 17y agoIt's a little ironic given slow startup time was a major reason why we switched away from CGI in the first place.