HTML 5 performance on Firefox? - performance

I tried this sample here:
http://9elements.com/io/projects/html5/canvas/
After a few minutes, Firefox slows down so much I can't even popup any menu. When I closed the tab, Firefox comes back to normal again.
So is HTML 5 really a good choice now ?

it ran very well for me - both firefox and chrome, saying that - chrome was smooother, although you'd expect it with the weight of FF on your system.
But you bring up a good point. I've heard some people say Flash is dead and HTML5 is the new Flash - and I'm not sure how they consider the new HTML5 as a comparison.
I've also heard this is due to flash being closed and proprietary. But how does this differ than HTML5 in act?
Perhaps a little off topic but it is relative to the point, HTML5 is a wonderful magic and with it allows a greatly wanted upgrade to the now flagging HTML markup. It'll take some time before browsers catch up but thats only an issue now.
When was the last time HMTL got an upgrade? 97? 1998? so roughly 10 years since HTML caught up, so Browsers have 10 years toget to grips with HTML5
So ya. HTML5 is wonderful and I love and its good to get to know it, cus in 2 years - it'll be the standard.

Yes, now is the time for HTML5. Browser support is good and growing very quickly. The power of the average computer is such that creating web applications that implement the more resource intensive HTML5 features is perfectly reasonable.
Also, as a point of correctness, you can't use the smoothness of one company's HTML5 experiment as a way of validating whether HTML5 is ready for wider use. I could create a C program that would repeatedly print out "Hello World", and do it so badly that after 5 mins your entire system grinds to a halt. Does that mean C isn't ready yet?
You also have to remember that when new technologies first come in, there are no widely established "best practices" or cunning tricks to squeeze every last bit of performance out of the new features. Even if computers / browser weren't ready for HTML5 yet (which I think they are), it needs to be released, adopted, and it's use refined so that those best practice patterns can emerge.

What's your environment? I tried that page with Firefox 3.6.3 on a PowerBook G4/1.67GHz, 2G RAM (a nice laptop when I bought it six years ago, but hardly a powerhouse by today's standards) and it ran fine for several minutes with no performance issues whatsoever. It actually ran smoother than the typical youtube video does on this machine...

Related

Is Internet Explorer 10 slower, when using compatibility mode?

Internet Explorer 10 has so-called compatibility mode, which can be activated to make older sites display properly.
If the compatibility mode is enabled, does it slow the overall pages performance and/or JavaScript? And is there any other impact apart from performance eg. overall stability, memory usage etc?
After a bit of thought, I think the answer to your questions is:
It depends.
It depends on what your site does with css. It depends what your site does with markup. It's entirely possible that some new CSS thing has come out in the last few years that IE 11 added very good support for, and the team of engineers spend lots of time optimizing. The old legacy way to do it might work, but be slower because it's old code that never got refactored and optimized. Imagine that repeated over and over... an old IE8 feature that now has a much faster IE11 css or markup equivalent... and you're not getting to leverage any of it.
Or, maybe your site uses none of that functionality, and it's (about) the same no matter which mode you're in. While the likely scenario is that you will probably see some sort of performance hit by running in compatibility mode, it certainly isn't guaranteed.

Chinese fonts rendering slowly at certain sizes?

This is going to sound ridiculous, but if I'm going to find someone who has even the foggiest clue about this, StackOverflow will be the place.
First, the platform I'm developing on: Motorola Handscanners. Running Windows CE 5 and/or 6. Running a web app on the mobile version of Internet Explorer 5.5. (I know, I know, but keep reading). Specifically the MC3190, MC9090 and MC3090. The 3090 has 64MB of ram, and the other two have 128.
Are you cringing? You should be. Read on anyways, it only gets more fun.
We made an update. Increased a font size slightly, and changed it's colour from black to blue. Wild, I know. All of our tests showed no issues at all, everyone loved the change, and it even seemed to increase user efficiency (industrial application).
Then we rolled it out to China, where the MC3090 is still used, with a Chinese installation of the OS with Chinese fonts. Immediately, rendering of text slowed to a crawl. We're talking 4 seconds to load an 8kb webpage. Networking is fine, the page is downloaded, but rendering seems to reach a standstill- and that is killing user efficiency. Also, it's pretty annoying for our users.
Potential solutions:
Upgrade hardware (in the works, but potentially years away, and expensive)
Don't make this change (considered, but we want to have our cake and eat it too)
Quit my job, because IE 5.5 (I look at it like working with special needs children)
So I come to you StackOverflow to ask: Does anyone have a clue why a slight font change on Chinese Fonts could result in such a huge change in rendering time on IE 5.5 and Windows CE 5?

Predict consequences of installing LESS, CSS3PIE on a high-load project

I faced situation of global site redesign (not appearance, but code architecture and underlying technologies). Website has about 135 000 visitors everyday. And it's crucial to make right decision now.
I had no experience of using LESS and CSS3PIE on such big projects before. Maybe some of you can predict some trouble which I can run into using technologies mentioned above. I would like to know advantages and drawbacks.
Isn't it better to use old tested and reliable methods like sprites for round corner buttons with shadows and gradients? I look at http://zappos.com. They just degrade gracefully in IE and don't use CSS3PIE.
Nobody answered me, so I try to answer myself. Since there are server-side LESS-compilers for all major platforms (Ruby, .NET, PHP) I decided to use LESS but compile server-side instead of using LESS.js which is not good because it prevents client's browser from caching CSS.
As concerning CSS3PIE I don't see any significant drawbacks of using it, a little more load lies on client using IE but it's not so bad.
The only issue I can foresee now is background and decoration disappearing on popups. I have already encountered this problem and posted a question here but no one ever answered.
I would avoid using CSS3Pie for production sites. In my experience, the higher the number of CSS3Pie-rendered elements on the page, the worse IE8/9 will perform.
Specifically, when I was using IE9 with an IE8 document mode, and with at least 2 elements rendered using CSS3Pie (using border-radius and linear-gradient), I observed a noticeable lag when scrolling the browser window. That is, I would try and scroll down the page, and the scroll bar would take a couple of seconds to "catch up" with the mouse pointer.
As soon as I switched CSS3Pie off, no lag when scrolling was observed. The same applies for IE8 in my experience.

AJAX vs ActiveX/Flash for browser-based game

I have been following the usage of JavaScript for the past few years, and with the release of extremely fast scripting engines (V8, SquirrelFish Extrene, TraceMonkey, etc.) the possibilities of JavaScript have increased dramatically. However, the usage share of Internet Explorer coupled with it's total lack of support for recent standards makes me want to drop a bomb on Microsoft's HQ, as it creates a huge amount of problems for any website.
The game will need to be pretty dynamic client-side, with animations and other eye-candy things, but not a full-blown game like those that run directly in the OS using DirectX or OpenGL. However, this might be a little stretch for JavaScript and will certainly feel extremely slow in Internet Explorer (given that the current IE engine can be hundreds of times slower than SFX; gotta see what IE9 will bring), would it be better to just do the whole thing in Flash? I know this means requiring the plug-in AND I have no experience whatsoever with Flash (other than browsing YouTube :P). It also means I can't just output directly from PHP, I would have to use XML or some other format to pass data to it (JSON is directly integrated in JS and PHP can deal with it easily).
Another idea would be to provide an alternative interface just for IE, though I don't know how (ActiveX maybe? or with Flash, then why not just provide it to all browsers) or totally not supporting it and requiring the use of other browsers, although this is plain stupid from a business perspective.
So here am I, wondering what approach to take and thus asking for your advice. How should I build the client-side? AJAX in all browsers, Flash in all browsers or a mix (AJAX for "modern" browsers and something else for the "grandpa": IE).
I recommend a plug-in platform (Flash, Silverlight, or Java) over AJAX. Having a clean layer of abstraction between your game and the client's browser is a big advantage. In any non-trivial AJAX game look forward to endless corner-cases where browsers differ in performance or implementation.
Personally, I think Flash is easy to learn if you are coming from AJAX experience. Flash is currently the most widely installed and proven plug-in for browser games. However, Silverlight and Java are both building momentum. Also, the Unity engine has become a popular choice for commercial browser games.
I think you shouldn't leave Java out of the equation. It's a powerful, fast language, and with Java applets, you can do almost anything. If you want hardware-accelerated graphics via OpenGL, JOGL can do it, even in an applet.
On the other hand, it might not be right for you. But at this early stage, I think you should evaluate all of your options, and since you have no experience with Flash but sound like you've got a bit of programming experience, you might feel more at-home with Java.
I believe the current answer is Flash game.
Alternatives:
Java Applet: getting less and less common those days and it is not commonly installed as a plugin on many computers.
SilverLight: too new and might vary and change in time. not commonly installed on many computers and it's Microsoft (whom tends to change technology every 2 years ...)
JavaScript / AJAX: Still a new kid on the block, it's on the rise it is true with many nice features, but still lack of good cross browser for IE even IE8, can not play sounds internally, still slower than the others, and you don't know where will it evolves.
Eventually probably the best solution for now is Flash development:
Cross platform. Works fast. Long time already alive and have a lot of support.
I hope this answer will change in the next year. Happy Peasach.
Check out Jmonkey. The "plugin" loads if you have Java on your machine. Once it's cached, the next time the visitor goes to the page, it your game loads very quick. Check out their website for demos and see what I mean: http://www.jmonkeyengine.com/
Oh, I forgot to say, it's a 3D scenegraph Java engine. I just tried it again, and it loaded in linux. Looks they've put in some good work.
Don't do it with javascript in the browser. And Flash really can be a pain just because it's closed source and you don't know if you've made a mistake or found a bug - speaking from experience. I'd never want to make another Flash game again.
How about using RaphaelJs , it is a Javascript library that make dinamyc images using SVG, and for IE, it try to make those images using the IE alternative: VML. Im using it on my own WebGame, but i dont really make complex graphics in it. The most complex thing done on RapahelJs was a heath map (20 * 20 tiles ) with a dinamyc opacity slider. An it work with jquery without any problem or configuration!

What are the (technical) pros and cons of Flash vs AJAX/JS?

We provide a web application with a frontend completely developed in Adobe Flash. When we chose Flash 6 years ago, we did so for its large number of features for user interaction, like dragging stuff, opening and closing menus, tree navigation elements, popup dialogs etc.
Today it's obvious that AJAX/JS offers roughly the same possibilities and because of the number of frameworks that are readily available, it's very feasible to implement them.
Is there a technical reason one should choose either technology over the other? By "technical", I mean performance, security, portability/compatibility and the like. I don't mean aspects such as the very non-programmer way development is done in Flash or whether it makes sense to switch an app from one to the other.
As I just explained in another question, it seems to me that JS is way ahead in terms of market share and I'm wondering whether we are missing some important point if we stick to Flash.
In addition to what others have said, Flash is constrained in the "rectangle" and cannot be added to a normal html page in an un-obtrusive manner.
#Gulzar I think when more browsers will support the video tag like mozilla 3.1 does we'll see even more adoption of ajax/js over flash.
Adobe Actionscript is a statically typed language, Javascript is dynamically typed. Depending on your point of view, this may be a good thing or a bad thing.
With Javascript/HTML/CSS you're going to be heading into cross-browser compatibility hell, especially if you want to support older browsers. This can be mitigated by the libraries that are available, but it's still a big headache. With Flash, you write the code once and it just works in all browsers.
Even with the libraries available, Flash user controls are simply more advanced than anything you can find in the world of Javascript/HTML. In Javascript, you are not going to find anything that comes close to the simplicity and power of a databound user control that Flash provides.
I don't see how Javascript has more of a "market share" than Flash. Pretty much anyone with a web browser has a Flash plugin installed. I'd be curious to know how many people disable Javascript but have a Flash plugin.
Also keep in mind that you're going to be in for a huge learning curve and lots of development time if you decide to switch your technology base so you'd really better have a good business reason to do it.
This decision also has a lot to do with what your application does and who your install base is.
Edit: I see people have mentioned that the iPhone doesn't have Flash support. I would expect this to change with the install base of the iPhone - Adobe would be crazy not to support it.
Correctly designed AJAX apps are more googleable than Flash
Correctly designed AJAX apps are more easily deep linkable than Flash
AJAX doesn't require a plugin (Flash is pretty ubiquitous, so it's not really a big deal)*
AJAX isn't controlled by a single company the way Flash is
Edited to add:
* Except for the iPhone, as Abdu points out.
JS and Flash both have great presence on the web with overlapping capabilities. One area JS is still lacking is in rendering video.
Flash, used well, allows easy localization and internationalization.
Furthermore, it is much easier to use Flash in an accessible manner; you can feed screen readers the right text, instead of having them iterate over all of the possible form elements.
I think Flash should be limited to online games, videos and animation. Otherwise use html and Ajax. It's a web standard and supported by almost all devices.
AFAIK, the iPhone doesn't support Flash. That's a fast growing segment you're blocking out already. Keep it simple and efficient.
Although flash is pretty ubiquitous on desktop browsers, mobile support is very limited (flash lite? yeah, right). I get really frustrated looking up a restaurant on my phone only to find the entire site is flash based and I can't even get a phone number or address!
One benefit of Flash is that it has a few facilities to help do cross domain type operations safely, which can be helpful. Flash also has (limited) support for some hardware, which is not possible with Javascript.
Personally, I'd try to use as much Ajax as possible before turning to something like Flash. From the UI perspective, it is better in that the controls and basic authoring is a little more developed. The Sound Manager project is a good example of effectively using a small amount of Flash while keeping the remainder in Javascript.
I suspect one of the reasons javascript is becoming more popular is that it's more easy to retrofit into an existing application.
As I can't accept two answers, I'm going to merge Christ Upchurch's and 17 of 26's answers in my own post. I think, these two together pretty much sum up what I wanted to know. Thanks guys!
If you're dealing a lot with polygons, then Flash is still easier to program and debug. With AJAX there are a lot of libraries to handle polygons, but the more libraries your app uses, the slower it gets.

Resources