site  contact  subhomenews

Locale setting is to blame

January 31, 2009 — BarryK
Well, well, well, this is amazing. I have discovered why scripts are slow in Intrepid.

Firstly, about Debian Lenny. I built the live-CD, and it worked. ROX-Filer did not start as a library is missing, but that is a small detail. It is a testimony to the Woof Unleashed concept that I was so easily able to switch from Ubuntu Intrepid to Debian Lenny.

Having booted Woof-Lenny, the first thing I did was run the 'speed-test' script. Oh dear, 143 seconds. Then I tried something that was in the back of my mind, something that I had noticed in the System Profiler -- it did seem that libc was very busy handling locale lookups. I did this:

# export LANG=C
# ./speed-test

Oh wow, I got 28 seconds!

So, I booted Woof-Intrepid, did the same LANG=C thing and also got 28 seconds.

Then I booted Puppy 4.1.2, which runs the script at 33 seconds, but with LANG=C I got just 22 seconds!

What this means is this:

Locale Time
en_US.utf8 appr. 150
en_US 33
C 22

So, what to do? This affects all our scripts. I moved to utf8 as that is the standard that all major distros have adopted, but it slows our scripts right down. How do we fix this, so that our scripts still run fast? Changing to LANG=C is bad for internationalisation. Perhaps we should stay with non-utf8?

I think that I'll stay with Lenny anyway, as it has Xorg 7.3. It was a bit strong to say the Ubuntu developers have lost the plot -- I would blame the release model, really they should release when the product is ready for release as Debian does, not to a timetable.

Comments

I Love Debian over ubuntu
Username: John Biles
Hello Barry K, While you'll lose some Apps that are in Ubuntu and not Debian due to Debian's GPL Policy, I've found that Debian Packages are far more easy to get working than Ubuntu and I love the idea of Woof now being based around Debian and not Ubuntu. Now I'm really looking forward to the next test release of Woof

Another Debian Lover
Username: John Logan
"Hello Barry, It was puppy which got me really interested in linux a few months ago after being a Windows user pretty much since getting my first pc (i am pushing 40). For the last couple of months I have tried a number of distros before finally settling on Debian as my day to day one. I love puppy and if it could be based on Debian that would be like Xbox games in choclate packaging. Your work astounds me.

speed test
Username: eprv
"On my Intel D945GCLF Atom based mini itx board the script is running 63 seconds in puppy 4.1.2 and 81 seconds in xubuntu 8.10 My locale is en_US It uses the Intel video chip but I had the flicker problem very rarely in Puppy and never In Xubuntu. Anyway The ubuntu people did bring Linux to the masses so they must be credited for that.

I had libc locale problem before
Username: labrador
"I found that libc in Puppy 4.x has some bugs with certain locale definitions. It crashes programs which try to fetch gettext strings. After replacing it with [url=http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-i686_2.7-10ubuntu4_i386.deb]libc 2.7 in ubuntu repositories[/url], everything works fine now. I also find another solution -- use the utf8 locale definition in libc 2.3 source code. This sounds absurd, but interestingly it works. Hope this could help.

UTF-8 need
Username: magerlab
"it does not sound good for me as i speak russian and unicode is the only one good solution to have all the characters to be displayed well in every application and translated scripts

Speed test
Username: VVoodstock69
"Barry my test results are as follows on a Compaq nx6320 laptop: LANG=en_AU.UTF-8 (35 sec) LANG=C (15 sec) I'm using Linux Mint 5 KDE CE


Tags: woof