HTML 5 Profiler #1
by Eric Preisz · 08/03/2012 (11:33 pm) · 19 comments

Short Version:
-We’ve started a new program called Innovation Friday and my personal project is an HTML performance analysis tool.
-The goals of this software is to:
- Provide a tool so that developers can test hardware, browsers, and HTML5 content on both canvas and WebGL.
- Provide detail on bottlenecks of each stage of the graphics pipeline, not just the performance of a single scene/game.
- Provide a single benchmark score that is a cumulative sum of its parts.
- Provide the capability to use the tool as part of a continuous build process.
-This will be an Open Source project hosted on GitHub…I’d love for you to join me.
-I have announcements for our products coming soon (please…no off topic posts).
Long Version:
I write code on the weekend. Why? Because it’s fun. And since profit isn’t necessarily my goal, I get to pick whatever I like. This year, I wrote an image processing test grading application, implemented my own SSL, along with other ideas (most of what I pick to do indirectly supports GG). This is how I keep up my programming skills since I rarely get a chance in my day to day routine.
I’m very motivated to work on those projects because of the freedom I have to define direction, goals, and implementation.
Last week, GarageGames started an initiative to bring employee’s creative ideas from their off hours into our walls. We call it Innovation Friday.
And the only reason I’m not posting this on the front page is because we are way behind in telling you how we are going to be more innovative with T3D, iTorque, and Torque 2D and I expect to get a stream of questions regarding the status of our products. For now, all I can say is that announcements are on the way.
So…on to the tool…
It started with my interest in HTML5 as a gaming platform for the future. I don’t think that HTML5 (when I say HTML5, just think Canvas and WebGL) will replace all game development formats since cutting edge games will always benefit from being closer to the metal…but I do think there will be some major advantages to have a standard format that is useable across many platforms. And if we’ve learned anything in the past five years, pushing the envelope with social, collaborative, and connected technology is as valuable as pushing the envelope of graphics and logic…and it’s the former where HTML5 excels.
So…on to the tool…
The goals are:
- I want to intimately learn how HTML 5 uses hardware accelerated graphics (that’s the selfish goal)
- Provide a test system that is useful for testing hardware (driver developers and manufactures), browsers (for browser developers like Google, etc.), and content (all HTML5 developers).
- Provide feedback on how each browser handles different aspects of rendering performance.
- Provide feedback for content developers to understand performance issues in their game/content.
- Provide mechanisms for using this web app as a part of a continuous build system.
Now that we’ve stated the goals, let’s talk about existing HTML5 benchmarking tools.
I know that there’s a need for a robust benchmark tool because the developers at WHATWG told me so. Being a natural skeptic, I decided to look into what I can find. If you know of any other tools, please let me know.
ie.microsoft.com/testdrive/Performance/FishBowl/
html5-benchmark.com/
www.kevs3d.co.uk/dev/asteroidsbench/
www.themaninblue.com/writing/perspective/2010/03/22/Each of these systems has strengths and weakness, but the missing piece of each is that they only tell you about performance of THEIR application. While that is useful, it doesn’t provide very much information about how YOUR application will run. Certain browsers may do better with certain aspects of rendering and a specific test application may exploit the differences to paint an inaccurate picture about the browsers overall implementation.
For example, if a given browser implements every stage of the graphics pipeline beautifully, but makes a mistake in how textures are implemented; the browser will appear to perform badly if the test happens to use a lot of texture. But, if you understand that a particular browser has issues with textures, you might be able to address that issue as a special case for that particular browser (i.e. Cut your texture resolutions in half).
So how will this project address the issue? The answer is to test each stage of the graphics pipeline. We will do that by isolating the particular stage with a performance test and present its relative performance for that given stage. This is where my background in GPU performance optimization will come into play. By running a test at each stage, we will fully understand the strengths and weakness of each browsers implementation. This will provide developers a much better picture of where bottlenecks lie for a given browser.
We will have an overall score for a browser, but it will be more of a performance index that is built from the sum of its parts. The overall score is helpful to some degree, but one brower’s score of 99 could be very different than another browsers score of 99 and without a drill down into the specifics, you’re stuck guessing.
So that’s the high-level overview. What’s next?
Matt, a web developer at GarageGames, and I will be experimenting and rapid prototyping. Once we are done, we will build a basic framework and publish that framework as an Open Source project (probably GitHub).
If you are interested in following, post a comment and I’ll notify you via e-mail as things progress. After we get the framework up and running, we will invite others to help us if they are interested.
Lastly, I’m in know way an HTML 5 expert. I’ve very comfortable with GPUs, but I know very little about how Canvas and WebGL use the GPU. It’s going to be an adventure…I hope you will join me.
About the author
Manager, Programmer, Author, Professor, Small Business Owner, and Marketer.
#2
08/04/2012 (4:33 am)
I'm interested, thanks
#3
This sounds like a lot of fun.
08/04/2012 (1:04 pm)
Integration of WebKit (or whatever Mozilla uses) in Torque technologies could provide a seamless platform for your work. It would work in a browser or in Torque engines. Perhaps a GUI control that incorporates this. Did someone at one time build this? I seem to remember someone putting this on textures in T3D. This sounds like a lot of fun.
#4
08/04/2012 (4:49 pm)
I'm sure this isn't the case but Innovation Friday does sound a bit like "we're cutting Torque development time by 20 percent" :/
#5
Unless GG is employing 24-hour development sweatshops over in China. Then you don't have off hours :P
08/04/2012 (5:37 pm)
Pretty sure 'Hey guys, post up what you've been working on in your off-hours' doesn't cut into dev time while they're at work. Because, you know, off-hours.Unless GG is employing 24-hour development sweatshops over in China. Then you don't have off hours :P
#6
Using Webkit as a 2D/gui engine inside Torque is not a bad idea. There are a lot of great Javascript libraries coming out and HTML 5 gives you a lot of flexibility. Of course, with Webkit you could also use Flash. Performance wouldn't be as good as something like Scaleform which is custom built for games.
But I'm more interested in HTML 5 as an output format someday. As a company, we need to find ways to support many, many, platforms in an affordable way. Right now, Unity, for example, needs to maintain 5 or so export formats and runtimes. With HTML5, we could hit more platforms with just one export and we would only need to support one runtime.
There will be a performance trade-off...hence my interest in HTML 5 performance.
@BigDaz - Employees qualify for Innovation Friday every week only if they work four 10 hour days (9 hours plus 1 hour lunch) from Mon-Thur. I'd like for us to hire 20% more resource than we need so that it's just a standard part of our work week...but we aren't there yet.
Tech moves quickly. If a tech company isn't innovating, they are dying.
08/04/2012 (6:05 pm)
@Frank - We recently updated the QT Webkit resource on our site. It was working fine but then we ran into an issue with video and sound (a QT WebKit issue). We switched to awesomium.com/ which worked better (and it should for $2900).Using Webkit as a 2D/gui engine inside Torque is not a bad idea. There are a lot of great Javascript libraries coming out and HTML 5 gives you a lot of flexibility. Of course, with Webkit you could also use Flash. Performance wouldn't be as good as something like Scaleform which is custom built for games.
But I'm more interested in HTML 5 as an output format someday. As a company, we need to find ways to support many, many, platforms in an affordable way. Right now, Unity, for example, needs to maintain 5 or so export formats and runtimes. With HTML5, we could hit more platforms with just one export and we would only need to support one runtime.
There will be a performance trade-off...hence my interest in HTML 5 performance.
@BigDaz - Employees qualify for Innovation Friday every week only if they work four 10 hour days (9 hours plus 1 hour lunch) from Mon-Thur. I'd like for us to hire 20% more resource than we need so that it's just a standard part of our work week...but we aren't there yet.
Tech moves quickly. If a tech company isn't innovating, they are dying.
#7
08/04/2012 (8:39 pm)
I'm interested.
#8
I have dabbled in HTML 5 a bit to put a 3D widget on the screen using some example code. It was not very fast from what I have seen. It will be cool to see what can be sped up on the different browsers!
I think it is a bit wishful thinking to think you will support just one platform with HTML 5. The reason is you know there will be at least 2 platforms: Internet Explorer and Everyone Else. Unless Microsoft decides to play nice.
Jquery is awesome! I am using it for a client now to move widgets around with some simple animation. It abstracts things very nicely.
Edit:
Woah! awesomium is free for "Indie Developers"!
08/05/2012 (12:11 am)
I am very interested in HTML 5 and XML/XSLT. I have used XML/XSLT on some recent work and it saved me a LOT of effort. I plan on using it for producing Torque Script from database information to build objects. I just fell in love with XML and what parsers can do. That was part of the draw for me to incorporate Python in T3D was to get access to the lxml library.I have dabbled in HTML 5 a bit to put a 3D widget on the screen using some example code. It was not very fast from what I have seen. It will be cool to see what can be sped up on the different browsers!
I think it is a bit wishful thinking to think you will support just one platform with HTML 5. The reason is you know there will be at least 2 platforms: Internet Explorer and Everyone Else. Unless Microsoft decides to play nice.
Jquery is awesome! I am using it for a client now to move widgets around with some simple animation. It abstracts things very nicely.
Edit:
Woah! awesomium is free for "Indie Developers"!
#9
Microsoft is sort of between a rock and a hard place...I don't think they have a choice.
Right now, around 86% of tech savvy users support canvas. Around 38% support WebGL.
08/05/2012 (6:45 am)
Quote:Unless Microsoft decides to play nice
Microsoft is sort of between a rock and a hard place...I don't think they have a choice.
Right now, around 86% of tech savvy users support canvas. Around 38% support WebGL.
#10
Cool to know. I guess I have not been paying attention to what MS has been up to. I searched around and found MS is working toward more standards compliance. This is a good thing. And since Adobe is now charging for performance features I would like to see more of what their Silver Light can do.
I did notice the same 3D test on Firefox runs faster in Chrome as well. Were the issues with WebKit something that was surmountable? Or was it just did not play nice with other software controlling hardware?
08/05/2012 (4:33 pm)
@Eric,Cool to know. I guess I have not been paying attention to what MS has been up to. I searched around and found MS is working toward more standards compliance. This is a good thing. And since Adobe is now charging for performance features I would like to see more of what their Silver Light can do.
I did notice the same 3D test on Firefox runs faster in Chrome as well. Were the issues with WebKit something that was surmountable? Or was it just did not play nice with other software controlling hardware?
#11
I downloaded Awesomium, but it's not clear what can I do with it.. no tutorial, code samples...and specially no source code.
Me too have been experimenting with HTML5 (Javascript in Canvas) and Qt WebKit. I am a big fan of Qt.
08/05/2012 (4:52 pm)
hmm... my crystal ball tells me that the next version of the 2D engine (the merged iT2D/T2D) will support Javascript maybe?... :)I downloaded Awesomium, but it's not clear what can I do with it.. no tutorial, code samples...and specially no source code.
Me too have been experimenting with HTML5 (Javascript in Canvas) and Qt WebKit. I am a big fan of Qt.
#12
Looks like the QT team was let go on Friday and the tech is expected to be sold. :( Another blow to the world of UIs. I think many people expect HTML 5 to be the next big thing in application guis.
08/05/2012 (8:02 pm)
@Pedro - First we learn, then we figure out what to do about Canvas.Looks like the QT team was let go on Friday and the tech is expected to be sold. :( Another blow to the world of UIs. I think many people expect HTML 5 to be the next big thing in application guis.
#13
From what I can tell Chrome is the fastest browser out there. This would be good for GUIs based upon HTML 5. This could be kind of exciting to do 3D GUIs in a browser instance.
08/09/2012 (12:41 am)
I did a search on rendering webkit to texture. Surprisingly I found this gem: berkelium.org/ It renders to a off screen instance of Chromium.From what I can tell Chrome is the fastest browser out there. This would be good for GUIs based upon HTML 5. This could be kind of exciting to do 3D GUIs in a browser instance.
#14
08/10/2012 (8:23 am)
@Eric it has been long we havn't heared are NEWS of our Products and there progress!
#15
The Qt issue is a blocker if you want video and sound in the browser. I posted the gritty details over in the Embedded Browser Resource thread.
08/10/2012 (12:30 pm)
@FrankThe Qt issue is a blocker if you want video and sound in the browser. I posted the gritty details over in the Embedded Browser Resource thread.
#16
08/10/2012 (4:12 pm)
@Bapi - A big announcement is coming in a few weeks.
#17
08/10/2012 (5:51 pm)
I posted a new blog on this weeks work: www.garagegames.com/community/blogs/view/21820
#18
08/18/2012 (10:21 pm)
I'm quite interested in this project, keep up the good work Eric.
#19
can u get u E-mail for me? I has something need trying contact u...
09/24/2012 (6:48 am)
@Eric Preiszcan u get u E-mail for me? I has something need trying contact u...

Associate Michael Hall
Distracted...