Why my code is running slow on MAC 10.4

Posted on June 11, 2007 by ZDima.
Categories: OS X, UNIX Dev.

I had a complaint that performance of the program was degraded after machine was upgraded to 10.4.

After investigation it is appear that system call ‘getcwd‘ become very expensive call where internally it is iterates through the each parent directory and collect information to construct the path rather then remember the program’s current folder.

Since this system call was use to save the name of a working directory to return to it later, the solution was to replace it with system calls open+fchdir that will actually do the same work. This was recommended in man pages for getcwd (MAC):

These routines have traditionally been used by programs to save the name
of a working directory for the purpose of returning to it. A much faster
and less error-prone method of accomplishing this is to open the current
directory (’.') and use the fchdir(2) function to return.

Featured Firefox Extension: Turn on a Safari-style address bar with FissionLifehacker

Posted on by (author unknown).
Categories: Contributors, Windows.
Fission.png

All platforms with Firefox: The Fission extension displays the progress bar as a solid color in the Firefox location bar, like Safari.

Fission lets you use either an image or a solid color to display the progress. Fission also lets you choose the location -- either the whole progress bar or to the right. Check out some more ways to consolidate Firefox's chrome. Fission is a free download and works anywhere Firefox does.

Fission [Mozilla Add-ons]