본문 바로가기

i'T news

Flash 와 HTML5 비디오 퍼포먼스 비교

요즘 Steve Job 의 발언으로 시작된 Flash 와 HTML5 에 한 이슈로 웹이 뜨겁게 달아 오르고 있는데요. Mac 환경과 Window 에서 각 브라우져 별로 비교한 자료가 있어서 소개 합니다.


테스트 환경

 

During testing, I followed this procedure:
- Turned off as many background processes as possible
- Updated my graphics card drivers
- Used the same YouTube video for all tests (http://www.youtube.com/watch?v=VJ5KJVCc5C4)
- First, I loaded the page
- Then switched the video to 720p, but left the video playing within the player window (not full screen)
- Then waited until the video completely downloaded (watching the little red bar thingie on the bottom of the player).
- Then I played until about 14 seconds in, waiting until the opening sequence cleared and the real world video began playing.
- Then, I started monitoring and recording the CPU Usage on Windows Task Manager and % Idle on Activity Monitor on a separate computer for 29 data points for each test. Since Task Manager updates once each second, that meant about 30 seconds of testing on Windows. Because Task Manager updates once every two seconds, that means about 60 seconds of video playback on the Mac.
- I used the CPU Usage directly from Windows and subtracted the % idle from Activity Monitor from 100% to derive total CPU utilization on the Mac.
- I rebooted between each test. 
- I ran each test at least twice to confirm results.


테스트한 브라우저


I tried to test the most current versions of all programs on both platforms: Here are the versions.

Windows:

- Apple Safari - Apple has a site called Webkit where you can download beta versions of the Safari browser (http://webkit.org/). Since the improvements in Flash Player 10.1 required the latest version of Safari, I downloaded that version - in Windows, it was 4.0.4 (531.21.10).

- Mozilla Firefox - version 3.6

- Google Chrome - 4.0.249.89 (I tried loading the Beta 5 browser, but it failed several times on this computer).

- Microsoft Internet Explorer - 8.0.7600.16385

- Adobe Flash Player - 10.0.45.2 first, then 10.1.51.95

Macintosh:

- Apple Safari - Webkit version was 4.0.4 (6531.21.10,55180).

- Mozilla Firefox - version 3.6

- Google Chrome - 5.0.307.9 beta

- Microsoft Internet Explorer - 8.0.7600.16385
- Adobe Flash Player - 10.0.45.2 first, then 10.1.51.95


Macintosh 에서의 테스트 결과


Table 1 shows the Macintosh results. Some observations.



Table 1. Macintosh results.


  • With Safari, native playback in HTML5 (at 12.39) was the most efficient alternative, and consumed significantly less CPU than playback via Flash (at 37.41), presumably because Apple uses H.264 hardware acceleration inside of Safari (see here). Flash Player 10.1 reduced playback CPU by 5 CPU % points (from 37.41 to 32.07), or about 14%. Before assuming that Flash is bad, and HTML5 good, please see the Windows results below.


  • With Chrome, playback via Flash and HTML5 were equally inefficient, both much higher than either Safari alternative. This is a head scratcher. I would guess that it means that Google isn't benefiting from hardware acceleration, though I don't know if that's because they "can't" or simply "haven't." Either way, Chrome shouldn't be your browser of choice on the Mac for spending serious time on YouTube.


  • With Firefox, playback via Flash (the only alternative) was slightly less efficient than Safari in Flash, but more efficient than Chrome using Flash or HTML5. Firefox actually slowed down with version 10.1.


I asked Adobe about this and Adobe's Emmy Huang commented “The 3-5% improvement on Safari is what we would expect with Flash Player 10.1 on Safari using Core Animation. Firefox performance however was slightly degraded because Flash Player switched from using QuickDraw to Quartz 2D." Now, on to Windows.




Windows 에서의 테스트 결과


Table 2 shows the Windows results. Some more observations.



Table 2. Windows results.


  • As mentioned, Safari wouldn't play the HTML5 videos on Windows, so I have no Flash vs. HTML5 comparisons there (I tested this on three Windows computer and the HTML5 page wouldn't play on any of them). However, Flash's ability to access hardware acceleration in 10.1 dramatically reduced Safari's CPU consumption from 23.22 to 7.43, a drop of 68%, which really makes you wonder how Flash would perform on the Mac if it could access hardware acceleration.


  • While Chrome's numbers were more efficient on Windows, playback with Flash Player 10.0 was about 24% more efficient than HTML5, while Flash Player 10.1 was 58% more efficient.


  • Version 10.1 also dropped Firefox's CPU utilization by a whopping 73% and Internet Explorer's CPU utilization by 35%.


To these scores, Adobe's Huang added "These results also indicate the strong benefits in performance hardware decoding brings for video playback in Flash Player and other technologies.”



이 문서에서는 결론적으로 Flash 의 비디오 성능은 나쁘지 않다. 또한 HTML5 의 비디오 성능도 좋지 않다. 다만 플랫폼에 따라 달라 질수 있다고 하네요.


원문은 다음 링크에서 확인 할 수 있습니다.


http://www.streaminglearningcenter.com/articles/flash-player-cpu-hog-or-hot-tamale-it-depends-.html