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."

24 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.

  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 Anonymous Coward · · Score: 3, Informative

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

    2. 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.
    3. 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
    4. 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.
  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: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.

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

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

  10. 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.

  11. 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?!

  12. 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.

  13. 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.

  14. 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
  15. In Excel, no less! by KlaymenDK · · Score: 3, Informative

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

  16. 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.