<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5901017961602475455</id><updated>2011-10-10T22:11:33.613-07:00</updated><category term='compression'/><category term='lzma'/><category term='lrzip'/><category term='bzip2'/><category term='gzip'/><category term='lha'/><category term='data compression'/><category term='rar'/><category term='zip'/><title type='text'>E L A N D E H O L M</title><subtitle type='html'>echo self::Foo();</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://elandeholm.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5901017961602475455/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://elandeholm.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>emanuel</name><uri>http://www.blogger.com/profile/13495294466688367322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_X3izEHPuIkM/SgKXvd6EJqI/AAAAAAAAAAM/pHSu7NZS20M/S220/jel-joggse-200.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5901017961602475455.post-7282263227703053823</id><published>2011-01-29T17:50:00.000-08:00</published><updated>2011-01-29T17:52:11.371-08:00</updated><title type='text'></title><content type='html'>&lt;span class="Apple-style-span" style="font-size: large;"&gt;The Indium Includer and Class Loader&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Indium comes with its own includer class called &lt;b&gt;Core\Includer&lt;/b&gt;. This class contains a thin set of wrappers around&amp;nbsp;PHP:s native&lt;b&gt; include&lt;/b&gt; language construct. In an Indium application, every file system operation that depends on&amp;nbsp;the &lt;b&gt;include_path&lt;/b&gt; ini setting should be routed through &lt;b&gt;Core\Includer&lt;/b&gt;. Of course, an application may choose to use &lt;b&gt;include&amp;nbsp;&lt;/b&gt;or &lt;b&gt;file_get_contents&lt;/b&gt; directly,&amp;nbsp;but this is neither supported nor encouraged.&lt;br /&gt;&lt;br /&gt;Why does Indium encourage applications to wrap includes?&lt;br /&gt;&lt;ol&gt;&lt;li&gt;First and foremost, we want to fight a potentially dangerous "feature" of PHP:s includer. If the specified file&amp;nbsp;cannot be found in &lt;b&gt;include_path&lt;/b&gt;, PHP will silently search the current directory and the directory in which the calling&amp;nbsp;script resides. This behavior has unpredictable (run time dependent) security implications, encourages the generation&amp;nbsp;of implicit dependencies and imposes an unnecessary cost in terms of file system operations. The only way to turn this&amp;nbsp;"feature" off is to specify an absolute path, or a path which is relative to the current directory. &lt;b&gt;Core\Includer&amp;nbsp;&lt;/b&gt;scans&amp;nbsp;&lt;b&gt;include_path&lt;/b&gt; to determin the absolute path of includes before calling on PHP:s native includer.&lt;/li&gt;&lt;li&gt;Controlling the scope inside which the include takes place. For reasons of encapsulation and security, Indium has to&amp;nbsp;be able to decide what is visible to an included view.&lt;/li&gt;&lt;li&gt;PHP:s includer is a swiss army knife. Wrapping and controlling it helps us in identifying common &lt;b&gt;include&lt;/b&gt; idioms and&amp;nbsp;providing standard, Indium blessed methods for carrying them out.&lt;/li&gt;&lt;li&gt;We love classes. We want to encourage application writers to use classes. Applications should rely on Indium's &lt;b&gt;Core\ClassLoader&lt;/b&gt; for autoloading.&lt;/li&gt;&lt;li&gt;Lastly, wrapping includes enables us to impose strict validation on file names, which helps with tightening up security.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Okay, that's the Indium includer covered, on to the class loader. The Indium class loader provides a unified and highly&amp;nbsp;configurable interface to class loading. It hooks into PHP SPL:s autoloading infrastructure and sits on top of &lt;b&gt;Core\Includer&lt;/b&gt;.&amp;nbsp;Essentially, the class loader provides a mapping from &lt;b&gt;( namespace path, class name )&lt;/b&gt; tuples to &lt;b&gt;include paths&lt;/b&gt;. Include paths&amp;nbsp;may be searched to any specified depth. In addition the class loader has "magic" hooks for Indium exceptions and interfaces;&amp;nbsp;these are automatically searched for in subdirs named "exceptions" and "interfaces". The best thing about Indium's class loader&amp;nbsp;and includer is that the appplication need not really care about them. As long as your put your controllers and models in&amp;nbsp;&lt;b&gt;APPLICATION_PATH/controllers&lt;/b&gt; and &lt;b&gt;APPLICATION_PATH/models&lt;/b&gt;, things are guaranteed to just work.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Core\Includer&lt;/b&gt; and &lt;b&gt;Core\ClassLoader&lt;/b&gt; has proven to be a very strong and robust combination which gives a reliable and secure&amp;nbsp;foundation to the Indium framework.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5901017961602475455-7282263227703053823?l=elandeholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elandeholm.blogspot.com/feeds/7282263227703053823/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5901017961602475455&amp;postID=7282263227703053823' title='2 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5901017961602475455/posts/default/7282263227703053823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5901017961602475455/posts/default/7282263227703053823'/><link rel='alternate' type='text/html' href='http://elandeholm.blogspot.com/2011/01/indium-includer-and-class-loader-indium.html' title=''/><author><name>emanuel</name><uri>http://www.blogger.com/profile/13495294466688367322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_X3izEHPuIkM/SgKXvd6EJqI/AAAAAAAAAAM/pHSu7NZS20M/S220/jel-joggse-200.png'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5901017961602475455.post-6893399339174451218</id><published>2011-01-11T05:40:00.000-08:00</published><updated>2011-01-11T05:48:58.117-08:00</updated><title type='text'></title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;&lt;b&gt;Ubuntu on an Acer Aspire 5000&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Okay, this is just me posting the kind of blog post I wish I could have googled for before I installed Linux on my laptop. Would have saved me some time... I hope it comes in handy to someone else.&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Hardware: &lt;a href="http://support.acer.com/acerpanam/notebook/0000/Acer/Aspire5000/Aspire5000sp2.shtml"&gt;[1]&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Processor: &lt;b&gt;Mobile AMD Turion 64 1600MHz&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Memory:&amp;nbsp;&lt;b&gt;1GB&amp;nbsp;DDR SDRAM&lt;/b&gt;, &lt;b&gt;128MB&lt;/b&gt; of which dedicated to video.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Graphics adapter: &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;SiS M760GX&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Audio:&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;RealTek ALC203 AC 97 Codec&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Ethernet adapter:&amp;nbsp;&lt;b&gt;SiS900 PCI Fast Ethernet&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Wireless network adapter:&amp;nbsp;&lt;b&gt;Broadcom Corporation BCM4318&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Storage: &lt;b&gt;Seagate ST9100822A Momentus 4200.2 100 GB ATA&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Partition layout:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_X3izEHPuIkM/TSxSBiyNUiI/AAAAAAAAAFA/aTus0i50pNE/s1600/disk.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_X3izEHPuIkM/TSxSBiyNUiI/AAAAAAAAAFA/aTus0i50pNE/s1600/disk.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;In retrospect, 4GB swap was really a mouthful since in practice swap is rarely touched. I could have gone by with 2GB for hibernation, but at least now I have room for that 2GB RAM upgrade...&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;32 GB for the root file system is a lot. I tend to accumulate a lot of crap in &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;~&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt; so it's nice to have a safety margin. I made sure that &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/opt&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt; is large enough to contain a copy of &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/home&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt; in case I need to do something drastic with root.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;b&gt;Works out of the box:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Sound. Audiophiles would probably not buy this computer but the on board codec does the job for me.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Graphics, Xorg plays along just fine at native 1280x800 resolution. No configuration needed. No DRI, slow 3D!&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Ethernet adapter.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Hibernation just works.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Touchpad. The first thing I did was disable "tap to click". My fine motor skills are simply inadequate for that.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;896 MB of memory is not terribly much but I find it surprisingly hard to provoke the machine into swapping.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;b&gt;Issues:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;b&gt;Fan control&lt;/b&gt; is borked in 10.10 (Maverick)! For some reason, the fan kicks in too late to prevent the CPU from transferring lethal amounts of heat to the graphics adapter, which overheats and freezes the computer. Solution: download Ubuntu 10.4 and hope this gets fixed in Natty.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Onboard SiS graphics adapter does not play nicely with &lt;b&gt;frame buffer console&lt;/b&gt;. Solution: blacklist frame buffer console by appending the line &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;"blacklist vga16fb"&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt; to &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/etc/modprobe.d/blacklist.conf&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;b&gt;Wireless&lt;/b&gt; is some proprietary Broadcom crap which does not work out of the box. Solution: use wired connection, run &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;jockey-gtk&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt; and install &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;b43-fwcutter&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Wireless should be up on reboot.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;Other than the stuff Casper installs for you, I installed &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;sensors-applet&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&amp;nbsp;for monitoring the temperature. Anticipating the Maverick move from &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;f-spot&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&amp;nbsp;&lt;a href="http://linux.slashdot.org/story/10/06/14/0055221/Ubuntu-Replaces-F-Spot-With-Shotwell"&gt;[2]&lt;/a&gt;. &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&amp;nbsp;I also installed the&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;shotwell&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;photo manager. For &lt;b&gt;PHP&lt;/b&gt; development I installed &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;apache2 &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;and &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;php5&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;. I'm currently evaluating&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Netbeans 7 Beta&lt;/b&gt;&amp;nbsp;&lt;a href="http://netbeans.org/community/releases/70/"&gt;[3]&lt;/a&gt; as my IDE, so I have installed it in my user directory. &lt;b&gt;NB 7&lt;/b&gt; needs the &lt;b&gt;Sun JDK&lt;/b&gt; which I downloaded and installed to &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;/opt/java&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Other software sources I have added:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://ppa.launchpad.net/sevenmachines/flash/ubuntu"&gt;http://ppa.launchpad.net/sevenmachines/flash/ubuntu&lt;/a&gt;&amp;nbsp;- Adobe Flash&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://ppa.launchpad.net/webupd8team/ubuntu-font-family/ubuntu"&gt;http://ppa.launchpad.net/webupd8team/ubuntu-font-family/ubuntu&lt;/a&gt; - For the new ubuntu font from Maverick&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://ppa.launchpad.net/tualatrix/ppa/ubuntu"&gt;http://ppa.launchpad.net/tualatrix/ppa/ubuntu&lt;/a&gt; - Ubuntu Tweak&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://ppa.launchpad.net/matthaeus123/mrw-gimp-svn/ubuntu"&gt;http://ppa.launchpad.net/matthaeus123/mrw-gimp-svn/ubuntu&lt;/a&gt; - Gimp 2.7&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span"&gt;&lt;a href="http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu"&gt;http://ppa.launchpad.net/ubuntu-mozilla-daily/ppa/ubuntu&lt;/a&gt;&lt;/span&gt;  - Firefox 4&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span"&gt;&lt;a href="http://linux.dropbox.com/ubuntu"&gt;http://linux.dropbox.com/ubuntu&lt;/a&gt;&lt;/span&gt; - Dropbox nautilus extension&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;a href="http://dl.google.com/linux/chrome/deb/"&gt;http://dl.google.com/linux/chrome/deb/&lt;/a&gt; - Google Chrome stable&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;That's it, really. I will add content to this post whenever I stumble over some new issue.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Footnotes:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;[1] http://support.acer.com/acerpanam/notebook/0000/Acer/Aspire5000/Aspire5000sp2.shtml&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;[2] http://linux.slashdot.org/story/10/06/14/0055221/Ubuntu-Replaces-F-Spot-With-Shotwell&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;[3] http://netbeans.org/community/releases/70/&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5901017961602475455-6893399339174451218?l=elandeholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elandeholm.blogspot.com/feeds/6893399339174451218/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5901017961602475455&amp;postID=6893399339174451218' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5901017961602475455/posts/default/6893399339174451218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5901017961602475455/posts/default/6893399339174451218'/><link rel='alternate' type='text/html' href='http://elandeholm.blogspot.com/2011/01/ubuntu-on-acer-aspire-5000-okay-this-is.html' title=''/><author><name>emanuel</name><uri>http://www.blogger.com/profile/13495294466688367322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_X3izEHPuIkM/SgKXvd6EJqI/AAAAAAAAAAM/pHSu7NZS20M/S220/jel-joggse-200.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_X3izEHPuIkM/TSxSBiyNUiI/AAAAAAAAAFA/aTus0i50pNE/s72-c/disk.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5901017961602475455.post-4663059741841628368</id><published>2008-07-19T18:30:00.000-07:00</published><updated>2008-07-19T19:54:29.043-07:00</updated><title type='text'>Compression and decompression shoot out</title><content type='html'>&lt;span style="font-weight: bold;"&gt;New benchmark!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I decided to do another test suite, this time including decompression. The data is a concatenation of two tar archives. The first tar contains 3+ GB of &lt;span style="font-weight: bold;font-family:courier new;" &gt;C:\Program Files&lt;/span&gt; from a Windows XP installation. The second tar is a 3+ GB Ubuntu installation, sans &lt;span style="font-weight: bold;"&gt;/usr&lt;/span&gt; which is on a separate partition. In total this amounts to 6.53 GB.&lt;br /&gt;&lt;br /&gt;The test host is my girfriend's 3 GHz P4 with 1GB RAM and 2MB L2 cache. It is rated at ~ 6000 bogomips. The computer is running Ubuntu 8.04 with a custom 2.6.25.4 kernel. All files were on an fuse mounted ntfs partition.&lt;br /&gt;&lt;br /&gt;In addition to processing time I tried to measure RAM usage with GNU time but I didn't get any meaningful results. I did manage to record page faults,and I may add those statistics later.&lt;br /&gt;&lt;br /&gt;This time lha is out. It doesn't seem to like files this big. Since I was also going to benchmark decompression I decided to include lzo, which is allegedly very fast at decompression.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Complete list of the contestants:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style="font-family: courier new;"&gt;&lt;li&gt;bzip2 1.0.4 (-9k)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;gzip 1.3.12 (-9c)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;lrzip 0.23 (-w 9 -q)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;LZMA SDK 4.43 (-9kq)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;LZO library 1.08 (-9 -k)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;RAR 3.71 (-m5)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;gzip was invoked in redirect mode (-c) because I didn't want it to throw away the source file. This shouldn't really affect compression ratio or processing times.&lt;br /&gt;&lt;br /&gt;Below are the results broken down into compressed size and ratio, compression time and decompression time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Compressed size, from worst to best:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style="font-family: courier new;"&gt;&lt;li&gt;uncompressed: 7,011,041,280 (6.53 GB), ratio 1.000&lt;/li&gt;&lt;li&gt;lzo_________: 4,719,645,902 (4.40 GB), ratio 1.486&lt;/li&gt;&lt;li&gt;gzip________: 4,563,292,811 (4.25 GB), ratio 1.536&lt;/li&gt;&lt;li&gt;bzip2_______: 4,428,910,323 (4.12 GB), ratio 1.583&lt;/li&gt;&lt;li&gt;rar_________: 4,125,923,141 (3.84 GB), ratio 1,699&lt;/li&gt;&lt;li&gt;lzma________: 3,840,213,621 (3.58 GB), ratio 1,826&lt;/li&gt;&lt;li&gt;lrzip_______: 3,585,069,056 (3.34 GB), ratio 1.955&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Wall clock compression time, from slowest to fastest:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style="font-family: courier new;"&gt;&lt;li&gt;lzma_: 8,409 s&lt;/li&gt;&lt;li&gt;lrzip: 7,904 s&lt;/li&gt;&lt;li&gt;rar__: 5,906 s&lt;/li&gt;&lt;li&gt;lzo__: 3,487 s&lt;/li&gt;&lt;li&gt;bzip2: 3,034 s&lt;/li&gt;&lt;li&gt;gzip_: 1,598 s&lt;/li&gt;&lt;li&gt;cat__: __111 s (for reference)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Wall clock decompression time, from slowest to fastest:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style="font-family: courier new;"&gt;&lt;li&gt;lrzip: 2,830 s&lt;/li&gt;&lt;li&gt;bzip2: 1,491 s&lt;/li&gt;&lt;li&gt;lzma_: __981 s&lt;/li&gt;&lt;li&gt;rar__: __604 s&lt;/li&gt;&lt;li&gt;gzip_: __503 s&lt;/li&gt;&lt;li&gt;lzo__: __449 s&lt;/li&gt;&lt;li&gt;cat__: __111 s  (for reference)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;The shell script used to gather these statistics is &lt;a href="http://jel-desktop.no-ip.org/comprtest.sh.txt"&gt;here.&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5901017961602475455-4663059741841628368?l=elandeholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elandeholm.blogspot.com/feeds/4663059741841628368/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5901017961602475455&amp;postID=4663059741841628368' title='0 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5901017961602475455/posts/default/4663059741841628368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5901017961602475455/posts/default/4663059741841628368'/><link rel='alternate' type='text/html' href='http://elandeholm.blogspot.com/2008/07/compression-and-decompression-shoot-out.html' title='Compression and decompression shoot out'/><author><name>emanuel</name><uri>http://www.blogger.com/profile/13495294466688367322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_X3izEHPuIkM/SgKXvd6EJqI/AAAAAAAAAAM/pHSu7NZS20M/S220/jel-joggse-200.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5901017961602475455.post-8371188926824043338</id><published>2008-06-04T03:48:00.000-07:00</published><updated>2008-06-04T07:05:24.867-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rar'/><category scheme='http://www.blogger.com/atom/ns#' term='bzip2'/><category scheme='http://www.blogger.com/atom/ns#' term='lrzip'/><category scheme='http://www.blogger.com/atom/ns#' term='gzip'/><category scheme='http://www.blogger.com/atom/ns#' term='lzma'/><category scheme='http://www.blogger.com/atom/ns#' term='zip'/><category scheme='http://www.blogger.com/atom/ns#' term='lha'/><category scheme='http://www.blogger.com/atom/ns#' term='data compression'/><category scheme='http://www.blogger.com/atom/ns#' term='compression'/><title type='text'>Compression shoot out</title><content type='html'>I had some time on my hands the other day and a 2.9/4 GiB debian lenny ext3 filesystem sitting rather idly on one of my hard drives (This fs serves as a backup OS in case my bleeding edge gentoo bellies up on me).  This fs includes Xorg, Firefox, Xfce4, GNOME among other installed packages. Having just observed the coreutils distribution switch to lzma I was really curious about lzma's performance. A file system filled with linux applications and data was a good candidate for compression testing. I decided to round up gzip, bzip2, lha, zip, rar, lzma and lrzip to see what they were made of.&lt;br /&gt;&lt;br /&gt;I copied the blocks to a file using dd, loop mounted the file and started copying from /dev/zero to a file on the loop mounted fs so as to prepare the unused blocks with redundant data. Eventually the dd command stopped with a file system full warning, so I synced the fs and deleted the zero stuffed file. I unmounted the looped back fs and started compressing...&lt;br /&gt;&lt;br /&gt;Several CPU hours later I had an impressive amount of digits which I have decided to share with you through this blog. Here are the hard numbers:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Original file:             &lt;span style="font-weight: bold;"&gt;__4,293,563,904&lt;/span&gt; (3.999 GiB) (4096 MiB down to nearest cylinder boundary)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Zero file size: _&lt;span style="font-weight: bold;"&gt;1,150,640,128&lt;/span&gt; (1.072 GiB)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Net fs size:               &lt;span style="font-weight: bold;"&gt;____3,142,923,776&lt;/span&gt; (2.927 GiB) (This number is used as the uncompressed size)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;fs usage per df:   &lt;span style="font-weight: bold;"&gt;3,065,671,680&lt;/span&gt; (2.856 GiB)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ext3fs overhead:             &lt;span style="font-weight: bold;"&gt;___77,252,096&lt;/span&gt; (2.458 %)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-family:courier new;"&gt;compressor _________size ______________ratio__________CPU usage&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;none_______&lt;span style="font-weight: bold;"&gt;3,142,923,776&lt;/span&gt;_(2.9271 GiB)_&lt;span style="font-weight: bold;"&gt;1.0000&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;gzip&lt;/span&gt;_-9____&lt;span style="font-weight: bold;"&gt;1,177,245,158&lt;/span&gt;_(1.0964 GiB)_&lt;span style="font-weight: bold;"&gt;2.6697&lt;/span&gt;_____&lt;span style="font-weight: bold;"&gt;_593&lt;/span&gt;s (sys 24s)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;zip&lt;/span&gt;_-9_____&lt;span style="font-weight: bold;"&gt;1,177,245,231&lt;/span&gt;_(1.0964 GiB)_&lt;span style="font-weight: bold;"&gt;2.6697&lt;/span&gt;_____&lt;span style="font-weight: bold;"&gt;_554&lt;/span&gt;s (sys 25s)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;lha&lt;/span&gt;_-o7____&lt;span style="font-weight: bold;"&gt;1,152,406,262&lt;/span&gt;_(1.0733 GiB)_&lt;span&gt;&lt;span style="font-weight: bold;"&gt;2.7273&lt;/span&gt;___&lt;/span&gt;_&lt;span style="font-weight: bold;"&gt;1,492&lt;/span&gt;s (sys 39s)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;bzip2&lt;/span&gt;_-9___&lt;span style="font-weight: bold;"&gt;1,082,698,303&lt;/span&gt;_(1.0083 GiB)_&lt;span style="font-weight: bold;"&gt;2.9029&lt;/span&gt;____&lt;span style="font-weight: bold;"&gt;2,316&lt;/span&gt;s (sys 25s)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;rar&lt;/span&gt;_-m5_____&lt;span style="font-weight: bold;"&gt;_942,002,518&lt;/span&gt;_(0.8773 GiB)_&lt;span&gt;&lt;span style="font-weight: bold;"&gt;3.3364&lt;/span&gt;____&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;3,481&lt;/span&gt;s (sys 30s)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;lzma&lt;/span&gt;_-9______&lt;span style="font-weight: bold;"&gt;871,912,252&lt;/span&gt;_(0.8120 GiB)_&lt;span style="font-weight: bold;"&gt;3.6046&lt;/span&gt;___&lt;span style="font-weight: bold;"&gt;10,334&lt;/span&gt;s (sys 23s, wall &lt;span style="font-weight: bold;"&gt;10,471&lt;/span&gt;s)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;lrzip&lt;/span&gt;_-w9___&lt;span style="font-weight: bold;"&gt;_849,062,862&lt;/span&gt;_(0.7908 GiB)_&lt;span style="font-weight: bold;"&gt;3.7016&lt;/span&gt;____&lt;span style="font-weight: bold;"&gt;4,483&lt;/span&gt;s (sys 35s, wall &lt;span style="font-weight: bold;"&gt;7,000&lt;/span&gt;s&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;(Sorry about the formatting...)&lt;br /&gt;&lt;br /&gt;Wall clock times are not much different from user times except for lzma and lrzip. This is because these beasts use large windows which results in swapping.&lt;br /&gt;&lt;br /&gt;Observations:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;gzip and Zip use the same algorithm, ie. PKZIP deflate. The file size difference is in headers. Zip compression is noticeably faster.&lt;/li&gt;&lt;li&gt;lrzip spent 42 minutes (!) swapping. I need more RAM!&lt;/li&gt;&lt;li&gt;There is an almost perfect correlation between CPU time spent and compression ratio achieved. The exception is that lrzip is a lot quicker than lzma (which lrzip uses, incidently) at highest settings.&lt;/li&gt;&lt;li&gt;It would be interesting to measure RAM usage during compression, but I haven't found a simple way to do that.&lt;/li&gt;&lt;li&gt;It would be interesting to benchmark decompression too. To be done.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Bench mark host and contestants information:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;AMD Athlon XP 2400+ @ 2GHz,256 kB L2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;1 GB DDR PC2700 @ 266 MHz&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Linux 2.6.24&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;gzip&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;1.3.12&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;Zip &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;2.32&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;LHa&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;1.14i-ac20050924p1&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;bzip2&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;1.0.5&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;RAR&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;3.71&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;LZMA SDK&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;4.32.6&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;lrzip&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;0.23&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;All built on host with &lt;span style="font-family:courier new;"&gt;gcc 4.2.3&lt;/span&gt; using &lt;span style="font-family:courier new;"&gt;CFLAGS="-march=athlon-xp -O2 -pipe".&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5901017961602475455-8371188926824043338?l=elandeholm.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elandeholm.blogspot.com/feeds/8371188926824043338/comments/default' title='Kommentarer till inlägget'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5901017961602475455&amp;postID=8371188926824043338' title='2 kommentarer'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5901017961602475455/posts/default/8371188926824043338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5901017961602475455/posts/default/8371188926824043338'/><link rel='alternate' type='text/html' href='http://elandeholm.blogspot.com/2008/06/compression-shoot-out.html' title='Compression shoot out'/><author><name>emanuel</name><uri>http://www.blogger.com/profile/13495294466688367322</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://2.bp.blogspot.com/_X3izEHPuIkM/SgKXvd6EJqI/AAAAAAAAAAM/pHSu7NZS20M/S220/jel-joggse-200.png'/></author><thr:total>2</thr:total></entry></feed>
