by

Why Is Java So Slow

Developer Productivity Report 2017 is an analytical report, based on an online survey of the Java community about the tools that teams and developers use. Why mobile web apps are slow. Ive had an unusual number of interesting conversations spin out of my previous article documenting that mobile web apps are slow. This has sparked some discussion, both online and IRL. But sadly, the discussion has not been as fact based as I would like. So what Im going to do in this post is try to bring some actual evidence to bear on the problem, instead of just doing the shouting match thing. Youll see benchmarks, youll hear from experts, youll even read honest to God journal papers on point. There areand this is not a jokeover 1. Reasons Why a Mac is Running Slow and What to Do About It. Lets face it. Nobody likes a slow application. It is our job to make sure our applications fulfill the functionality need completely, but at the same ti. Im not going to guarantee that this article will convince you, nor even that absolutely everything in here is totally correctits impossible to do in an article this sizebut I can guarantee this is the most complete and comprehensive treatment of the idea that many i. OS developers havethat mobile web apps are slow and will continue to be slow for the forseeable future. Now I am going to warn youthis is a very freaking long article, weighing in at very nearly 1. That is by design. I have recently come out in favor of articles that are good over articles that are popular. This is my attempt at the former, and my attempt to practice what I have previously preached that we should incentivize good, evidence based, interesting discussion and discourage writing witty comments. I write in part because this topic has been discussedendlesslyin soundbyte form. Why Is Java So Slow To DownloadWhy Is Java So Slow On MacThis is not Yet Another Bikeshed Article, so if you are looking for that 3. No they dont this is not the article for you. Goreadoneofthese ohnomakeitstop cant breathe not. A%2F%2Fchzmemebase.files.wordpress.com%2F2011%2F12%2Finternet-memes-unlikely-my-friend.gif&size=400x1000' alt='Why Is Java So Slow To Load' title='Why Is Java So Slow To Load' />HNtoo Icantdothisanymore pleasejuststop somanyopinionssofewfacts. Icangoon.  On the other hand, as best as I can tell, there is no comprehensive, informed, reasonable discussion of this topic happening anywhere. It may prove to be a very stupid idea, but this article is my attempt to talk reasonably about a topic that has so far spawned 1. In my defense, I have chosen to believe the problem has more to do with people who can discuss better and simply dont, than anything to do with the subject matter. I suppose well find out. So if you are trying to figure out exactly what brand of crazy all your native developer friends are on for continuing to write the evil native applications on the cusp of the open web revolution, or whatever, then bookmark this page, make yourself a cup of coffee, clear an afternoon, find a comfy chair, and then well both be ready. How To Remove A Hypalon Patch more. A quick review. My previous blog post documented, based on Sun. Spider benchmarks, that the state of the world, today, is that mobile web apps are slow. Now, if what you mean by web app is website with a button or two, you can tell all the fancypants benchmarks like Sun. Spider to take a hike. But if you mean light word processing, light photo editing, local storage, and animations between screens then you dont want to be doing that in a web app on ARM unless you have a death wish. You should really go read that article, but I will show you the benchmark anyway Essentially there are three categories of criticism about this benchmark The fact that JS is slower than native code is not news everybody learned this in CS1 when they talked about compiled vs JIT vs interpreted languages. The question is whether it is appreciably slower in some way that actually matters for the kind of software you are writing, and benchmarks like these fail to address that problem one way or the other. Yes JS is slower and yes it matters, but it keeps getting faster and so one day soon we will find ourselves in case 1 where it is no longer appreciably slower, so start investing in JS now. I write PythonPHPRuby server side code and I have no idea what you guys keep going on about. I know that my servers are faster than your mobile devices, but surely if I am pretty comfortable supporting X,0. JIT  How hard can it be I have the rather lofty goal of refuting all three claims in this article yes, JS is slow in a way that actually matters, no, it will not get appreciably faster in the near future, and no, your experience with server side programming does not adequately prepare you to think small and correctly reason about mobile performance. But the real elephant in the room here is that in all these articles on this subject, rarely does anyone actually quantify how slow JS is or provide any sort of actually useful standard of comparison. You know slow relative to what  To correct this, I will develop, in this article, not just one useful equivalency for Java. Script performancebut three of them. So Im not only going to argue the traditional hymns of wa wa JS is slow for arbitrary case, but Im going to quantify exactly how slow it is, and compare it to a wide variety of things in your real life programming experience so that, when you are faced with your own platform decision, you can do your own back of the napkin math on whether or not Java. Script is feasible for solving your own particular problem. Okay, but how does JS performance compare to native performance exactly Its a good question. To answer it, I grabbed an arbitrary benchmark from The Benchmarks Game. I then found an older C program that does the same benchmark older since the newer ones have a lot of x. Im trying to insert rows of inmemory data into a table on SQL Server Express 2005. It is running what seems to me very slowly about 5 seconds per 1000 rows inserted. How I got 200ms load times and 100 PingdomGTmetrix scores using these 40 speed optimization tips for slow WordPress sites. This FAQ answers common questions about Java HotSpot Technology and about performance in general. Unless otherwise noted, all information on this page applies to both. Why does my Google Chrome work slow I keep getting a window kill page or wait. This is happening all the time now. Even using your pages I have to wait. Ive had an unusual number of interesting conversations spin out of my previous article documenting that mobile web apps are slow. This has sparked some. Then benchmarked Nitro against LLVM on my trusty i. Phone 4. S.  All the code is up on Git. Hub. Now this is all very arbitrarybut the code youre running in real life is equally arbitrary. If you want a better experiment, go run one. This is just the experiment I ran, because there arent any other experiments that compare LLVM to Nitro that exist. Anyway, in this synthetic benchmark, LLVM is consistently 4. Nitro So if you are wondering How much faster is my CPU bound function in native code instead of Nitro JS the answer is about 5x faster. This result is roughly consistent with the Benchmarks Games results with x. GCCV8.  They claim that GCCx. V8x. 86.  So the result seems in the right ballpark, and also seems consistent no matter if you are on ARM or x. But isnt 15 performance good enough for anyone Its good enough on x. How CPU intensive is rendering a spreadsheet, really Its not really that hard. Problem is, ARM isnt x. According to Geek. Bench, the latest MBP against the latest i. Phone is a full factor of 1. So thats okayspreadsheets really arent that hard. We can live with 1. But then you want to divide that by fiveWoah there buddy. Now were down to 2 of desktop performance. Im playing fast and loose with the units, but were dealing with orders of magnitude here. Close enough. Okay, but how hard is word processing, really Couldnt we do it on like an m. Well, this is an answerable question. You may not recall, but Google Docs realtime collaboration was not, in fact, a launch feature. They did a massive rewrite that added it in April 2. Lets see what browser performance looked like in 2. What should be plainly obvious from this chart is that the i. Phone 4. S is not at all competitive with web browsers around the time that Google Docs did real time collaboration. Well, its competitive with IE8. Congratulations on that. Lets look at another serious Java. Script application Google Wave. Wave never supported IE8according to Googlebecause it was too slow. Notice how all these browsers bench faster than the i. Phone 4. S Notice how all the supported browsers bench below 1. The i. Phone benches 2. It, just like IE8, isnt fast enough to run Wave.