Archive for the ‘Webtechnology’ Category

No Comments

Browser performance and CPU load

Tuesday, June 14th, 2011

Chromium is using 2 cores and Opera isn’t running full speed on Sunspider JS benchmark. That is the outcome of a simple test running TOP while taking the sunspider benchmark on a quadcore (AMD 630) Ubuntu 64 machine with the three main browsers: Chromium, Firefox and Opera. Opera 11.11 is surprisingly never using more then 80% CPU while Firefox 4 is using 100% and Chromium 12 150%. A quadcore can take 400%, when all 4 CPU cycles are fully utilized. Opera is the slowest performer on the benchmark, no surprise and Firefox is somehow disabling graphical output: nearly no load on X-server, and no visual graphical output, while Opera and in a lesser extent Chromium show a lot of flickering and flashing. Opera is also putting a bigger load on Compiz, the compositing window manager for Linux, AKA 3d eye candy. But Opera, as said before, is also giving more visual feedback about downloading files and stuff with an animated icon in the addressbar.

Sunspider benchmark results

Firefox 4:	Total:		   355.6ms +/- 2.6%
Chromium 12:  Total:		   348.2ms +/- 4.9%
Opera 11.11:  Total:		   413.2ms +/- 3.3%

TOP results

Firefox 4
Tasks: 277 total,   2 running, 273 sleeping,   1 stopped,   1 zombie
Cpu(s): 27.1%us,  3.5%sy,  0.0%ni, 69.0%id,  0.3%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   5093632k total,  5016508k used,	77124k free,   220824k buffers
Swap:  9055228k total,		0k used,  9055228k free,  2074600k cached

PID USER	  PR  NI  VIRT  RES  SHR S %CPU %MEM	TIME+  COMMAND
7063 user	   20   0  923m 325m  41m R  101  6.5   2:46.61 firefox-bin
2193 root	   20   0  235m 131m  32m S   12  2.6  12:11.16 Xorg
3119 user	   20   0  374m  62m  20m S	8  1.3   5:13.44 compiz

Chromium 12
Tasks: 280 total,   3 running, 273 sleeping,   3 stopped,   1 zombie
Cpu(s): 44.0%us,  9.0%sy,  0.0%ni, 46.3%id,  0.8%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   5093632k total,  4856072k used,   237560k free,   217760k buffers
Swap:  9055228k total,		0k used,  9055228k free,  2011968k cached

PID USER	  PR  NI  VIRT  RES  SHR S %CPU %MEM	TIME+  COMMAND
7317 user	   20   0  880m  81m  26m R  102  1.6   1:20.46 chromium-browse
2193 root	   20   0  243m 138m  40m S   44  2.8  13:07.53 Xorg
7295 user	   20   0  519m  51m  31m R   41  1.0   0:37.04 chromium-browse
3119 user	   20   0  374m  62m  20m S   11  1.3   5:33.46 compiz

Opera 11.11
Tasks: 280 total,   4 running, 272 sleeping,   3 stopped,   1 zombie
Cpu(s): 23.3%us, 11.3%sy,  0.0%ni, 64.1%id,  1.2%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   5093632k total,  4849588k used,   244044k free,   217972k buffers
Swap:  9055228k total,		0k used,  9055228k free,  2004908k cached

PID USER	  PR  NI  VIRT  RES  SHR S %CPU %MEM	TIME+  COMMAND
6051 user	   20   0  863m 428m  29m S   81  8.6  13:51.12 opera
2193 root	   20   0  236m 131m  32m R   47  2.6  13:22.27 Xorg
3119 user	   20   0  374m  62m  20m R   18  1.3   5:38.20 compiz

Conclusion

Seems that Opera isn’t going full throttle on benchmarks. I wonder why that is. Chromium is the only browser that is using multiple cores, but it isn’t actually much faster than Firefox. Another interesting thing is that Chromium feels the snappier browser but actually is stressing your PC more.

No Comments

Native HMTL5

Monday, June 6th, 2011

1 Comment

Creating spinners with CSS transitions/transform and a bit of JS

Wednesday, June 1st, 2011

CSS3 can deliver animations without the help of javascript libraries. Less code, less server requests, so faster loading of your website.

Furthermore CSS will be hardware accelerated by the browser when possible. Not now, but in the near future. So it’s preferable to use CSS instead of javascript. Goodbye to jQuery UI?

We will see, since mobile web is really emerging we’re in the need of a better content/pagesize ratio. Less markup, less JS, less server request, and faster loading.

So a little example here. Compare it to the javascript driven various spinners out there on the internet.

No Comments

How to create shortcuts for moving windows in Ubuntu (Unity)

Wednesday, May 18th, 2011

Ubuntu Unity is a smart attempt to bring innovation to the the desktop and program handling of Linux users. Actually Linux is far more user-friendly the people think, it has repositories since the last century, and if you don’t know what repository is. It’s an app-store. Yes, Linux invented the app store, this means you just have to search and click to install a trusted and tested program.

Why doesn’t anybody knows this? Because it’s free software, so it lacks advertisements budget, so it won’t make it into the newspapers, because newspapers nowadays are filled with advertisements on one side and press-releases and sensational breaking news on the opposite side. And if they write about innovation it’s about lifestyle and things you can buy.

Another strong  and catching feature is the Compiz, a window manager that brings 3D and hardware acceleration to your desktop. Scaling, fading, sliding of programs adds to the fun of daily work on your computer and it works amazingly fast and smooth. Off-course you need a graphics card, but most will do, like integrated Intel.

Unity doesn’t bring all the shortcuts you want, so how do you move program windows from one monitor to another, in a two monitor big desktop setup. Just install  wmctrl, you will find it in the Linux appstore. In short;

  1. Install  wmctrl

    sudo apt-get install <em>wmctrl</em>
  2. Open  CompizConfig Settings Manager (CCSM),

    ccsm
  3. or install it if you don’t have it:

    sudo apt-get install compizconfig-settings-manager
  4. Add this in the command settings

    wmctrl -r :ACTIVE: -e 0,1920,-1,-1,-1

    and


    wmctrl -r :ACTIVE: -e 0,0,-1,-1,-1

  5. Add shortcuts to this commands in the next `key-binding`tab,
    CTRL SUPER RIGHT
    CTRL SUPER LEFT

Now you can switch any program that has focus between monitors with your keyboard. Change 1920, if your left monitors doesn’ have that resolution and offcours you need a huge desktop setup with two monitors left and right. And the best, you don’t need Unitu for this it works in all Ubuntu versions with compiz, and even without compiz, you can set the commands with metacity.

No Comments

Thoughts about the new Unity user interface in Ubuntu 11.04

Tuesday, May 10th, 2011

Ubuntu has brought a major change to the Linux desktop with their 6 months update of the Linux OS and it’s called Unity. Ubuntu tries to innovate on two fields: maximising workspace for the user, remove clutter form the interface and speed up window and program handling.

Like most new innovations reactions are mixed. Some people like it, and some don’t , mostly because they hate changing their daily habits, or because they lost control how to tweak things.

I like the improvements that Unity brought, so let’s take a look. (more…)

No Comments

Mobile web data stats, hard to measure and to interpret

Tuesday, April 12th, 2011

PPK is a informative source for developments on the web, especially the mobile web. since he turned away from javascript the last years.

Still I doubt his analysis of his monthly Mobile browser stats can stand the test for science. (Webp image screenshot, saved 45% compared to jpg. supported by Chrome and Opera, click to see jpg) or follow link.

A few questions raised:

  1. What do I actually see, how is the market share defined?
    bandwidth, server logs, requests, time, analytics, users, User Agent strings?
  2. There seems to be mixing up of platforms and browsers: I use Opera on Android, in which row do I belong?
    Opera or Android. You expect Opera, but in his words he expected Android to have passed Blackberry. Well, they just put me in the wrong category!
  3. Opera is using compression proxy servers that will lower the bandwidth with up to 50%.
    Opera is also pre-formatting content (OBML), compressing images to the new WebP pcture format (much better then jpg), and minimizing the amount of server requests, which is slowing mobile web quite severely. That also makes traffic difficult to measure and compare to other platforms. And then competition has started similar services: Bitstream Bolt and UC browser.
  4. I use my Android mostly at home or at my desk using ADSL landlines. Is that mobile web?
    Statcounter should break down their numbers to platform, browser and provider/data carrier. We need to differentiate between WIFI, and GSM/UTMS. Is Mobile web  defined by device or by usage/location.

Don’t get me wrong, I really like PPK and his works, and I know he is at least trying to get some order in the chaos of mobile life, and he is working with the data provided by Statcounter.

On the other hand, maybe the absolute numbers are wrong, if you don’t change your methods, trends still remain visible. I keep reading PPK Quirksblog.