Posts

Showing posts from April, 2008

[Solution] Ubuntu Hardy resume from suspend (to RAM) problem solution

People that are already using Ubuntu Hardy 8.04 may experience problems with the suspend functionality: After resuming a suspended system the screen remains off because the resume does not work. The one-liner bellow have solved the problem for me: echo SUSPEND_MODULES=\"ehci_hcd\" > /etc/pm/config.d/WORKAROUND This is just a workaround for a known bug that hopefully will be corrected until the final release next week.

Heap or stack -- struct vs. class declaration and the influence on performance in .NET

The XmlSerializer namespace in .NET requires the XML structure of a document to be declared as a class or struct . In fact many examples in the wild use the class method to serialize a XML document, which has major disadvantages . One of these disadvantages is that good coding style requires one separate source file for each class to be created, which can make the source tree very large. However the main disadvantage is the performance overhead created by the declaration of an unnecessary class that determines the structure of the XML document. The reason for this performance overhead is the high consumption of memory which is required in .NET for every class which is stored on a stack . The solution is quite simple: Refactor the according classes to structs . The data structure "struct" requires only a heap in .NET which consumes less memory .

Firefox switches to Qt4 framework and drops Gecko in favor of the WebKit rendering engine

Mozilla CEO John Lilly have finally unveiled Mozilla´s plans for the upcoming Firefox 4.0 development effort. John Lilly admitted that Mozilla have to get rid of old habits and to switch to Qt4 as the underlying GUI framework of the new Firefox release as well as to drop the Gecko rendering engine in favor of Apple´s WebKit rendering engine . Furthermore Lilly regret that this decision have not already been made one year ago. So Firefox 3.0 could already use this superior technology. Lilly pointed out that keeping Gecko alive until now was the "biggest mistake since U.S. Navy´s decision to install Windows NT on a warship which had to tow the crippled ship back to port ". Google´s choice to use WebKit for its mobile phone framework Android was primary driven by the fact that Gecko´s code base is in a completely unmaintainable state and -- Lilly concluded -- " have more (memory) leaks than a rubber dinghy I have bought on Ebay for 1 USD ".