Slashdot Mirror


Freeciv As Benchmark of HTML5 Canvas Javascript Performance

Andreas(R) writes "The Freeciv.net crew has benchmarked their web client, which is a rich web application using the HTML5 canvas element. This shows how fast Firefox, Google Chrome, Safari and Internet Explorer perform using the latest HTML5 web standards."

46 of 246 comments (clear)

  1. That's hardly a benchmark by Anonymous Coward · · Score: 3, Funny

    Now someone just needs to port the Quakes over, for a real benchmark. None of this turn-based strategy nonsense. :p

    1. Re:That's hardly a benchmark by biryokumaru · · Score: 3, Insightful

      Well, seeing as Freeciv runs at 7 or 8 fps on Chrome for them, I imagine Quake will run pretty phenomenally.

      --
      When you're afraid to download music illegally in your own home, then the terrorists have won!
    2. Re:That's hardly a benchmark by fuzzyfuzzyfungus · · Score: 4, Funny

      In the interests of deliberate perversity(and broad cross-browser compatibility), some madman should really just use the good old HTML table as a graphics rendering mechanism.

      Make it 320 columns wide and 240 rows deep, for old-school flavor, with all cells empty, and just treat each cell's background color as a pixel value...

      What could possibly go wrong?

    3. Re:That's hardly a benchmark by El_Muerte_TDS · · Score: 3, Informative

      QuakeLive doesn't run in the browser. It is just the Quake 3 engine wrapped into a browser plugin.

    4. Re:That's hardly a benchmark by textstring · · Score: 2, Funny

      here's conway's life in a fullscreen 20x20 table: http://etcet.net/projects/conway.html
      it gets about 2-3 fps on my atom box. 100x100 is about 10spf

  2. Not fast by Toonol · · Score: 3, Informative

    Worth noting that Chrome, as the fastest, is still only eight frames per second, which would be dreadful even for a turn-based game. I didn't see where they said how powerful of a machine they ran it on, so I assume it's a moderately powerful pc. Still, it's within an order of magnitude of where it needs to be, so it'll probably be running smoothly within a year or two.

    1. Re:Not fast by maitai · · Score: 2, Informative

      I'd assume it's not. I ran their benchmark with Chrome on Win 7 and my Sony laptop and got 43.8ms as the result which is quite a bit faster than they listed as their result.

      I also got 149.72 with FF 3.6, which again is quite a bit faster.

    2. Re:Not fast by Anonymous Coward · · Score: 3, Informative

      Most people like to scroll around the map a bit while they're planning their turn . . .

    3. Re:Not fast by onefriedrice · · Score: 5, Funny

      Computer processing speed has increased well over an hundredfold over the past decades; so what do we do with all the extra power? We rewrite games we played many years ago on top of so many layers of abstraction that they're no longer playable, even on our modern hardware. Hurray for progress.

      --
      This author takes full ownership and responsibility for the unpopular opinions outlined above.
    4. Re:Not fast by BitZtream · · Score: 3, Insightful

      No, the data updates once per turn. Things like animations (not sure that freeciv uses any) and moving the map around for a different view can happen many times in the interium, and of course as you send it all the commands each turn for what to do, loading UI displays and such, all of that is running at 8fps too.

      --
      Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
    5. Re:Not fast by Rogerborg · · Score: 4, Interesting

      And I believe the trend will be for consumer CPUs to aim for lower heat and power, rather than higher speed. Unfortunately, the abstraction layers just keep piling on there.

      Give it another few years, and we might not be able to emulate Commodore 64 games on the desktop any more.

      --
      If you were blocking sigs, you wouldn't have to read this.
    6. Re:Not fast by pak9rabid · · Score: 2, Interesting

      Unfortunately, the abstraction layers just keep piling on there.

      Well, to be fair, they're just re-writing software the way it should have been done in the first place, but couldn't originally due to the hardware's limited capabilities.

    7. Re:Not fast by ClosedSource · · Score: 2, Funny

      "And yet, the NeXT systems had a reputation for beautiful graphics."

      Sure. Both users agreed.

  3. Re:Drop IE8 by fuzzyfuzzyfungus · · Score: 3, Insightful

    For the home user, not much, and Google's sneaky updates in the background model will piss them off less than Microsoft's blatant tooltips whining at you to update.

    To the gimlet-eyed corporate IT guy who controls the browser on 10,000 seats and DroneCorp Inc, LLC, on the other hand, it will pretty much come down to "Which one will allow me to break anything you might possibly do instead of your work just by clicking at group policy objects for a few minutes?" and "Which one will pull updates from WSUS?". This is why Chrome's marketshare is increasing at a fair clip; but the worker bees at DroneCorp Inc, LLC will be getting IE7 sometime in 2012...

  4. Re:Opera? by biryokumaru · · Score: 4, Informative

    They had rendering issues with Opera's implementation of one of the functions they were using. One of the Opera developers is actively helping them fix it, which is pretty impressive on Opera's side.

    --
    When you're afraid to download music illegally in your own home, then the terrorists have won!
  5. In case anyone was wondering... by Beardydog · · Score: 4, Funny

    The iPhone is not quite fast enough : /

  6. Re:Drop IE8 by deniable · · Score: 3, Interesting

    If it was just GPOs and WSUS, IE8 would dominate simply for security reasons. The main reason for IE6 is the combination of idiotic managers/developers that have locked a lot of applications into IE6 only. As for 2012, we got approval to upgrade to IE7 six months ago. Thanks, Oracle.

  7. Re:IE8 performs awesome, as usual by cbhacking · · Score: 5, Informative

    Clearly you didn't even read the article, just looked at numbers. IE should not have even been tested - it does not support HTML5 canvas elements! They worked around this using a bunch of really ugly hacks that completely destroyed the performance, but honestly they'd have been better off simply saying "it doesn't work, we'll wait until IE9, thanks for giving us Acid2 compatibility but you've got a long way to go!"

    IE8 actually works pretty damn well for much of the modern web; it's far from the fastest but it's fast enough for most, it is compatible with CSS2 and the other standards most web developers still use, and it has fixed most of the issues that people have cursed at IE over for so long. However, it has very little support for new standards - its CSS3 is still limited, and as far as I know it supports no HTML5 at all. Compared to the rapid improvement of other browsers, the IE team had better be on their toes or they'll be left far behind in the dust.

    --
    There's no place I could be, since I've found Serenity...
  8. Re:Opera? by CannonballHead · · Score: 2, Interesting

    Try looking at the comments on the linked page. There's an opera dev that has commented and they appear to be working on getting it working.

  9. Re:IE8 performs awesome, as usual by Anonymous Coward · · Score: 4, Informative

    Worth pointing out that HTML5 isn't a standard yet. It's still in draft for the next couple years.

  10. Re:IE8 performs awesome, as usual by Anonymous Coward · · Score: 2, Insightful

    Yeah, because all these browser makers falling all over themselves to implement a half baked, incomplete standard that nobody's using for much of anything are so ahead of the game, amiright? Nobody but neckbeards cares about HTML5...yet.

  11. Re:Opera? by BigDXLT · · Score: 5, Insightful

    Indeed. I found the comments more interesting than the article.

  12. Safari on Snow Leopard? by EmotionToilet · · Score: 2, Insightful

    Would testing it in Safari on Snow Leopard make much of a difference compared to the 32-bit Windows version? To me it seems Safari is always snappier on OS X. My general rule is that on Windows I use Chrome and on OS X I use Safari. This just seems to work well for me.

  13. Re:Drop IE8 by smash · · Score: 2, Interesting
    NTLM/windows domain authentication - single sign-on.

    I haven't seen an alternative browser that it works reliably on yet. Yes, its a windows specific thing, but until other browsers properly support single sign on you're not going to get them into the corporate workplace in any fully supported manner. And if they're not at work, they're less likely to end up getting installed at home, either.

    I mean, i'm an admin and run plenty of different browsers, but from a "please why won't the users leave me alone" perspective, properly patched IE plus any half competent malware protection (corporate firewall, managed AV solution, etc) IE on the corporate desktop wins.

    --
    I run: Windows, OS X, Linux, FreeBSD. Just because you have a hammer, doesn't mean everything is a nail.
  14. Re:Graphics by macshit · · Score: 2, Insightful

    I'm still a bit pissed-off that such a change would be made, unannounced, to people like me that actually pay for their services. This is a bit angrifying.

    Why? The buttons are small, not particularly intrusive, and useful for people that use those services -- and as they're very popular, that's a lot of people.

    If you don't use FB/twitter, or don't want to link to slashdot stories from there, then don't click the buttons.

    Yeesh...

    --
    We live, as we dream -- alone....
  15. Re:bias by Sycraft-fu · · Score: 5, Informative

    'Cause Vista's not as slow as people claim. I've never seen any evidence, either in my testing or online, that Vista ran programs any slower than XP. Most of Vista's slowness rep came from two things:

    1) Lots of messing with the disk, particularly on boot. Vista wanted to cache a ton of shit in memory, probably to aggressively, as well as other stuff. Could lead to a system being sluggish to respond to users when it first started.

    2) People running it on crap hardware. Vista has a much higher minimum bar than XP for good performance. You really want a dual core and 2GB minimum for a nice system (as opposed to a P4 and 1GB being fine for XP). Lots of people had older systems, tried the new OS, and got mad because it didn't work well. Duh. Newer software needs more resources.

    So it doesn't surprise me that a pure app test worked fine on Vista. It was never slow at that.

  16. Re:IE8 performs awesome, as usual by Radhruin · · Score: 4, Interesting

    I think what info we've released publicly with IE9 is promising. New and vastly improved javascript engine, hardware accelerated rendering, lots of new standards support (and we're highly active in ECMAScript v5 and joined the SVG working group). Oh, and did I mention, we now do rounded borders?!

  17. Firefox 3.5 outperformed Firefox 3.0 by Billly+Gates · · Score: 4, Informative

    SuSE OpenLinux had an old 3.0.7 version of Firefox while Vista had a newer version.

    Firefox 3.5 has a totally rewritten javascript engine from scratch. It uses some dynamic tree mathmatical aglorithms to perform operations many times faster and has support for javascript functions mapped in ram before execution. Vista used Firefox 3.5 while SuSE had Firefox 3.0.7 installed without the new javascript engine. Firefox 3.0.x was a ram hog compared to 3.5 too.

    I also imagine Safari would execute on MacOSX much better than Windows since its designed for it. Itunes is kind of proof as it sucks on Windows.

  18. Re:bias by Billly+Gates · · Score: 2, Insightful

    On my laptop I have noticed a huge performance increase with Ubuntu compared to Vista running netbeans, open office, and Firefox. You are right its mostly disk. However disk access is the number one bottleneck on modern pcs so that is very important.

    The problem is Windows loves to load a million services at once and the disk can only handle so much when it boots.

    You should try running your win32 apps on Windows7 with the same hardware as vista? You will notice quite a difference. Also the slower processors and the 1 gig of ram are in again thanks to netbooks and the recession we are in. Windows 7 is really nice ... except for the 3 app limit in the default installations.

  19. Re:Opera? by BikeHelmet · · Score: 3, Interesting

    A year ago I experimented with HTML5, and made (you guessed it) a Tetris clone, which took advantage of Canvas elements.

    I noted that when drawing entire images, it was all very fast. Drawing a frame took about 12ms in Firefox and Opera. (limited by the precision of the timer)

    Then I tried combining all the images into one, and drawing a region from the tileset. Talk about slowdown! Wow! Separate 64x64 images blitted fast, but as soon as it was dealing with a 512x512 image, the time to render jumped to about 500ms.

    I did some quick pixel math and concluded both Opera and Firefox must've been making a copy of the entire tileset every time I tried to blit a region from it. It's the only thing that added up. When I boosted the size to 1024x1024, it jumped to over 2000ms for a frame. Completely ridiculous! ;)

    Perhaps someone else could chime in about whether this bug has been fixed? Note: I was blitting from Image elements to Canvas elements. Canvas to Canvas always worked fine for me.

  20. Re:IE8 performs awesome, as usual by Achoi77 · · Score: 2, Interesting

    Man, I should have read the article. FTFA:

    Note that the implementation for Internet Explorer 8 does not use the HTML5 canvas element, because this isn't supported. Freeciv.net implements a canvas-replacement using DHTML and divs with clipped background-images. Therefore the test results are not directly comparable with the other web browsers.

    That's what I get for not reading the article :-(

  21. Re:Graphics by Endymion · · Score: 2, Informative

    in stylish or usercss or whatever:

    @namespace url(http://www.w3.org/1999/xhtml);

    @-moz-document domain("slashdot.org") {
      .share, .sharebar {
        display: none !important;
      }
    }

    --
    Ce n'est pas une signature automatique.
  22. Coherence? by renoX · · Score: 3, Insightful

    Amusing so Vista is as good as XP for running programs but it need much more powerful hardware(!).
    Don't you see a "small" contradiction/incoherence in your post?

    1. Re:Coherence? by TheRaven64 · · Score: 3, Interesting

      No, it's a question of scalability, which is often more important than raw speed. With some systems, they perform well in relatively restricted hardware, but the performance improvement when you add more does not scale linearly with the extra RAM, CPU, and so on. With others, you get more constant overhead, but better scalability. Think of the overall performance as constant overhead + scalability load * resources. With XP, it sounds like the constant overhead is lower (which makes sense, as it had to run on 200MHz chips), but the scalability load is higher (which also makes sense, because it wasn't designed for 4+ cores and 2+GB of RAM).

      Or, to put it another way, if XP gets 80% of the maximum theoretical performance out of a 200MHz Pentium with 128MB of RAM, but only 50% of the maximum theoretical performance from a 2GHz Core 2 Duo with 4GB of RAM, while Vista gets 50% and 70%, respectively, what the grandparent said would be true and contain no contradictions.

      Various things in modern operating systems are optimised to take advantage of lots of spare RAM (for example, aggressive pre-fetching of data from the disk). Splitting services up into concurrent tasks has more overhead from context switching, but lets you scale better to multiple processors. Older desktop operating systems treated RAM as a very scarce resource and were heavily optimised for the single-CPU case, because hardly anyone had more than one CPU.

      --
      I am TheRaven on Soylent News
  23. Re:Opera? by zwei2stein · · Score: 2, Insightful

    I'd expect them to help out.

    It is kind of bad for pr when performance test of all popular browsers do not include yours because it won't run in it (and in it alone)...

    --
    -- Technology for the sake of technology is as pathetic as eschewing technology because it's technology.
  24. Re:bias by pandrijeczko · · Score: 2, Informative

    I can admit to never having used Vista.

    But I have noticed on the back of pretty much all of the boxed PC games at my local Game store that the each game's requirements now quote differently depending on whether you're running XP or Vista - and the difference for Vista is usually an additional 0.5GB of memory plus a slightly faster CPU.

    So it does suggest that Vista has considerably more overhead than XP.

    --
    Gentoo Linux - another day, another USE flag.
  25. In Excel, no less! by KlaymenDK · · Score: 3, Informative

    Space Invaders, Monopoly, ... oh my.
    http://gamesexcel.com/games-excel-vba.html

  26. Re:Drop IE8 by dbIII · · Score: 2, Insightful

    The problem is not the "corporate IT guy". Instead it's the lazy developers that insist that their product of 2010 will only work on IE6 running as Admin with three different versions of dotnet. I wish these MS Windows application developers would actually learn about the platform they develop for instead of thinking it's still MSDOS with no network.

  27. Re:bias by Anonymous Coward · · Score: 2, Interesting

    One of the biggest reasons in the apparent jump in performance from Vista to Win7 was MS fixing the ungodly GDI problem that Vista had - there's a fairly thorough write-up about it here http://blogs.msdn.com/e7/archive/2009/04/25/engineering-windows-7-for-graphics-performance.aspx

    Essentially, GDI in Vista scaled in a square/cube fashion with each new object taking up memory in both system and graphics memory - a double whammy for any machine with integrated graphics which hammered the memory bus and, if you didn't have enough memory, your swap file as well. Cue loads of machines slowing to a crawl with the usual excuse that they're "not powerful enough" for Vista. This was untrue - we had a couple of Vista workstations at work (needed 64bit) with 8GB RAM and if you open enough windows you'll still exhaust your memory.

    Thankfully they fixed this for Win 7 and you can now boot in on a machine with 1GB of RAM and run it quite comfortably; the minimum I've managed to get Vista to run nicely in is 1.5GB with some tweaking (this was a friends laptop that was sold with vista and... 512MB of RAM, the poor lass. Took 15minutes to bot).

    Executive summary: Vista was a bloated piece of crap.

    Posting anon cos I've already modded this thread.

  28. Freeciv.ORG by Lord+Satri · · Score: 2, Informative

    The summary and the freeciv.net main page (I'm sure it's somewhere else but that's my point) doesn't mention this: it's based on freeciv.org.

    (also strange; the freeciv.org site only mention freeciv.net in their 'community news', not 'project news', so it really seems "distinct projects", they're not officially promoting the other option, yet?)

  29. Re:Drop IE8 by Cederic · · Score: 2, Interesting

    It's the difference between ideal approach and pragmatic real-world approach.

    Vendor A offers IE6 support only (back when it was IE6 or Netscape) and meets 90% of the requirements out of the box; Vendor B offers IE6 and Netscape support but only meets 60% of the requirements out of the box. Since nobody has Netscape installed it's a complete no-brainer to buy from Vendor A, even though you get browser lock-in as a result.

    The entire point of web apps in a business environment isn't the ease of replacing the browser, it's the ease of replacing the version of the software being rendered by the browser, and not having to install a separate client for each system - you install one browser once and everything uses it.

    The knee-jerk overreaction was merely highlighting that people don't make bad decisions on purpose. They make complex decisions with a lot of compromises and browser support is merely another compromise.

    Even if you do mandate multi-browser support, the IE6 based system requires IE6, Netscape or Lynx (as its chosen browsers). You still haven't got IE8, Firefox or iPhone/Safari support because they just didn't exist back then. It's pretty harsh calling someone an idiot for buying a system that doesn't support technology that doesn't exist.

  30. FreeCiv vs Civ4 by moonbender · · Score: 2, Interesting

    I started playing Civ4 last week for a couple of games -- it runs very well in Wine, incidently -- and I'm wondering how FreeCiv compares. Obviously the graphics aren't there, but after a couple of games that seems less and less important. The gameplay mechanics are what matters, and I think they work very very well in Civ4. And is the AI any good? Wikipedia seems to imply that diplomacy is a bit simple.

    Anybody got "in-depth" experience with both games?

    --
    Switch back to Slashdot's D1 system.
  31. Re:IE8 performs awesome, as usual by wbo · · Score: 3, Interesting

    Based on your description I doubt the problem is with IE 8, rather I suspect the problem is with a mis-behaving browser plugin. New blank tabs should open nearly instantly and each tab loads in a separate thread

    For instance, the Sun Java SSV Helper plugin for IE tends to cause a lot of the problems that you are describing including taking 3-4 seconds to open new tabs at times. I have no idea exactly what the Java SSV Helper plugin does but I have yet to encounter a Java applet that won't run without it, so I just disable it.

    I have also seen the Adobe PDF Link Helper plugin cause problems (although the latest version of Adobe Reader 9 appears to have fixed most of those problems.)

    Try starting Internet Explorer using the No Add-Ons shortcut and see if you still have problems. If performance is improved then you can launch IE the normal way and go to Manage Add-Ons and try disabling add-ons one by one until you find the ones that are causing problems.

  32. Re:IE8 performs awesome, as usual by ClosedSource · · Score: 2, Interesting

    No, they're living in 2010 with a 60% market share.

    Unless HTML5 outperforms Flash it's not likely to be the reason for anybody to switch. Anybody who hates MS or Flash has already switched, right?

  33. Re:IE8 performs awesome, as usual by Simetrical · · Score: 2, Informative

    Firefox 3.0 doesn't support HTML5 either, but they've included that in the test, and it performs a lot better than IE8.

    Firefox has supported <canvas> since 1.5, so it was perfectly fair to include 3.0.

    --
    MediaWiki developer, Total War Center sysadmin
  34. Re:IE8 performs awesome, as usual by Simetrical · · Score: 2, Informative

    Worth pointing out that HTML5 isn't a standard yet. It's still in draft for the next couple years.

    Canvas is at last call at the WHATWG. Look at the little tags at the side: "Last call for comments". This means that the WHATWG (a standards organization) believes that part of the spec is stable and is asking for implementations.

    Canvas is also a de facto standard. Gecko, WebKit, and Presto have all implemented it more or less interoperably for an awful long time now: Firefox since 2005, for instance.

    You are correct to say that HTML5 is not yet a W3C standard, unless you call Working Drafts "standards". But the W3C is not the only standards body out there.

    --
    MediaWiki developer, Total War Center sysadmin