Monthly Archives: February 2007

Community contributions improve Delphi 2007 RTL performance

One of the areas I’ve worked on in the Delphi 2007 release is the inclusion of Delphi Community RTL contributions. Now, including community contributions is not new to Delphi. In fact, there is a project called FastCode which is dedicated to providing highly optimized, high quality replacements for existing RTL routines. With Delphi 2007 we’ve replaced the following RTL routines with code from our user community including the FastCode project under an MPL 1.1 license which is consistent with previous community contributions:

Contributor(s) Routine
FastCode and Pierre le Riche SysUtils.CompareStr
FastCode and Pierre le Riche SysUtils.StrLen
FastCode and John O’Harrow SysUtils.LowerCase
FastCode and John O’Harrow SysUtils.UpperCase
Pierre le Riche System._LStrCmp

Since this release is interface compatible with BDS 2006 we had somewhat less flexibility to take RTL replacements but the door will swing back open with our next release and I’ll continue integration of these great contributions.

Delphi 2007 desktop switching performance improvements

The Delphi/BDS IDE supports saving of desktops, or window layouts, via a dropdown list available from the main toolbar. These desktops allow you to control which windows are visible and arrange their size, position and docked location. For example, here is my design-time layout:

Delphi IDE design layout

As you can see I use the “undocked IDE” meaning my code editor is free floating, not docked into the top main toolbar window. I actually like the docked IDE but I prefer to do everyday work using the undocked layout to make sure it’s always getting tested.

Now About the Perf…

The other day Mark Edington our performance cop recruited me to help with tuning the performance of switching desktop which I mentioned was keeping me busy on Tuesday. This morning I checked my email and Mark had done some timing of my new code and found “The general average seems to be that things are approximately 30% faster”. Cool! Couple this with the flicker work I’ve been doing and I think the Delphi 2007 experience is going to be much nicer.

Microsoft Windows Vista breaks common keyboard usage patterns

If you’re like me and you prefer the keyboard over the mouse then you’re likely to find Windows Vista as frustrating as I do. I can’t believe some of the keyboard patterns that Vista has completely busted. For example, on the common open file dialog pressing Shift-Tab from the File edit box leaves you on the column header of the listview like this:

Vista open file dialog

[UPDATE] Pressing ESC from here fails to dismiss the dialog!!!

At this point, pressing Enter does this!

Vista open file dialog

What the hell?? After Shift-Tab you have to press Shift-Tab again to focus the listview. Who decided making the listview columns into a tab stop was a good idea? But this is just scratching the surface, the Vista Explorer is another can of worms.

Below is a screenshot of the Vista Explorer right after I launched it, what has the keyboard focus? Pressing tab lands you at #1 then consecutive tabs take you through the rest of the backwards tab order. Based on the file open dialog I’d have expected to go from the column header to #8 but instead it jumps backwards and to the upper left corner!

Vista Explorer tab order

There there’s the sublte stuff like this for focus difference

Vista tab focus

This one is focused.

This one is not.

The next problem I struggled with for a bit was our build not working. During our build process we run gacutil and register a number of assemblies but I kept getting:

RegAsm : error RA0000: An error occurred while writing the registration information to the registry. You must have administrative credentials to perform this task. Contact your system administrator for assistance.

But what about???

Well, that’s just not enough. You have to right click the 4NT icon and select:

Which invariably lands you here:

By the way, I had to switch to using Remote Desktop just to get a screenshot of that dialog because PrtScn doesn’t work when you’re locked into a UAC confirmation.

That about wraps up my first hour in Vista and I can’t wait to see what else is in store.

CodeRage: CodeGear's free online developer conference

CodeRage developers conference March 12-17, 2007

Next month CodeGear is hosting it’s first ever virtual online developers conference. Here are the details:

When: March 12-16, 2007
Where: Presented online at CodeGear Developer Network
What: Sessions covering Developer Studio (Delphi, C++Builder and C#Builder), JBuilder 2007, InterBase and new Q1 products. Here is more information on the sessions to be presented and you can find the agenda here.

If I had any artistic talent I’d have made my own banner where the “Gear” in CodeGear would shuffle around and end up reading CodeRage but this stock image will have to do.

UPDATE: Fix the spelling of “virutal” (thanks Tiberius).

Sysinternals: free utilities from Microsoft now in a single install

Awhile ago Microsoft gobbled up the SysInternals guys ( Mark Russinovich and Bryce Cogswell) and now they’ve wrapped up all their utilities into a single install. If you’re not already familiar with with this set of Windows utilities you should be. The tools they’ve developed over the years have become invaluble for solving problems and troubleshooting poorly behaved applications/drivers as is evident with Microsoft’s acquisition.

Recommended:'s Delphi Programming RSS feed

If you’re a Delphi developer I’d highly recommend subscribing Zarko Gajic‘s Delphi Programming RSS feed from It’s a little unfortunate that the XML icon on the site doesn’t link you directly to the Feed but rather a subscription page that starts with an email subscription form which confused me for a second until I realized that the RSS info was at the bottom.

Anyway, Zarko cranks out useful Delphi tips seemingly every day of the week so you’re bound to see something that’s useful to you. I’ve linked to his column in the navigation section of the right hand sidebar of my blog.

Keep up the great work Zarko!

Happy Birthday Delphi, 12 years and counting!

Today marks 12 years since Anders Hejlsberg demo’ed Delphi in front of several thousand developers during Software Development Conference 95 West in Moscone Center. The whole development team was in attendance and the room was packed. Later that day we all took a buses over to the Discover Museum and I remember sitting next to a few developers who were talking about the Delphi demo. They were very skeptical about having an IDE actually write code, like event handlers, for you. They didn’t know I worked on the dev team and I turned around and assured them that it worked just fine. Based on the look on their faces I’m not sure they believed me. 🙂

Happy Birthday Delphi!

New Release of DUnit 9.3.0 available for download

Jud Cole, the DUnit Project Admin just announced that there is a new version of DUnit available for download.

Recent additions to DUnit 9.3.x

  • FASTMM support, including optional memory leak checking on a per test basis, resulting in improved execution speed of many tests.
  • New DUnitW32 project group for Delphi 2005+ with new projects DUnitW32,
    DUnitTestLibW32 and UnitTestsW32.
  • New DUnit4Net project group for Delphi 8+ with existing project UnitTests4Net.
    Automatic MadExcept support for stack tracing in TestFramework.pas.
  • Optional checking that each test case calls at least one CheckXXX method.
  • Optional detection of each test case that overrides the global GUI test case settings.
  • Optional halting of a repeated test on the first failure.
  • Carried the GUITestRunner.pas changes to the main form creation over to NGUITestRunner.pas and QGUITestRunner.pas.
  • Added a display refresh timer to GUITestRunner to ensure display update in long unit tests.
  • A couple of minor bug fixes.

Great work and congrats to the DUnit crew!