Category Archives: windows

Slow Outlook 2007: the comments keep coming

Comments to blogs are less visible than the blogs themselves, especially to feed subscribers, yet they can be equally or more interesting than the original entry. Since I blogged about Outlook 2007 performance problems, the comments have kept on coming. Here’s the latest:

I can only say that my Outlook 2003 was OK, but after upgrading to 2007 its just been insanely slow. I can barely write an email, Outlook will hang while I type. Unbelieveable that my ten human fingers are faster than a computer capable of doing millions of calculations per second … I am wasting 2+ hours daily waiting for Outlook.

Why do users care so much about Outlook? Maybe because it is where they live; email, contacts, appointments, everything is there.

 At least, it is where they live at the moment. Nobody can afford to waste 2 hours a day on slow software.

I realise that not every Outlook 2007 user is affected – just the ones with the largest mailboxes. These are the people who use Outlook most intensively. Microsoft should give this urgent attention.

MySpace, Microsoft and scalability

I was impressed when I learned at Mix06 last year that MySpace runs on Microsoft’s platform. After all, MySpace is one of the top 10 busiest sites on the web (currently 6 according to Alexa), and stuffed with dynamic content. So it makes a great case study for Microsoft.

Or does it? The downside of being so prominent is that problems with MySpace reflect badly on Microsoft’s platform. Thus you get articles like Larry Dignan’s MySpace: IT On a Wing and Microsoft Prayer.  

The article Dignan references describes how MySpace has coped, just about, with unexpected and explosive growth. It’s been a ragged evolution, and sounds more like a desperate attempt to keep pace than smooth upscaling. That said, this is more a characteristic of the particular scenario – web site copes with unexpected growth – than a characteristic of the Microsoft platform as such. However it is apparent that 32-bit SQL Server 7.0 was really not up to this level of scalability, and by all accounts even 64-bit SQL Server 2005 is being pushed to its limits.

Two bits of context here. First, the majority of software projects have far more modest requirements than MySpace. Second, there are other scalability examples, such as Microsoft’s favourite case study the London Stock Exchange, which runs smoothly enough as far as I know. Smaller than MySpace, of course, but business-critical in a way that MySpace will never be. On balance it seems that Microsoft’s platform is scalable enough for most of us. That does not mean that it is the best choice, or the most cost effective, or the more reliable. It just means that muttering “it doesn’t scale” is not the potent argument that perhaps it used to be.

Technorati tags: , , ,

The tangled web of Windows Vista versioning and compatibility

There are good reasons why applications may need to know what version of Windows they running on. Some things work differently, such as Unicode on Windows 9x vs Windows NT series; some features may need to be enabled or disabled; or at worst the application may need to close because it just does not work on certain versions of Windows.

Naturally enough, there is an API call for this purpose. Two in fact: GetVersion and GetVersionEx.

Trouble is, they lie. There are three characters in this drama. Let’s call them Nanny Microsoft, Good Developer and Bad Developer.

The problems start with Bad Developer, who writes an app that requires (let’s say) Windows 2000 or XP. These versions of Windows (and Server 2003 as it happens) have a major version number of 5. So Bad Developer writes an app that checks for a major version number of 5. If it is anything else, the app says “Goodbye” – maybe during setup, maybe at runtime, or maybe both.

Enter Nanny Microsoft with a brand new edition of Windows. The major version number is now 6. Bad Developer’s app won’t run, because 5 != 6. Customers are unhappy. No problem, says Nanny Microsoft. The silly Bad Developer should have written the app to check for versions equal or greater to 5. We’ll fix GetVersion so that in certain circumstances it returns a major version of 5 even when it should return 6.

In which circumstances, you wonder. That’s when it gets unclear. Could be one of the compatibility modes. Could be when specific known applications are calling the API. Here’s a past case (not Vista, though I haven’t checked) that gives special treatment to apps called either setup.exe or launch.exe.

So Nanny Microsoft “fixes” GetVersion to lie, Bad Developer’s app works, and everyone is happy.

Everyone that is except Good Developer, who wrote an app that really does need to know the version of Windows. Good Developer’s app is failing because customers are running it on versions of Windows it does not support. Good Developer’s code checks the OS version dutifully, but it gets the wrong result because of the work Nanny Microsoft did on behalf of Bad Developer.

The snag here is that Microsoft can’t introduce an API call like GetRealVersion. If it did, Bad Developer would call it and make the same mistake, and then GetRealVersion would end up dishonest as well.

Is Bad Developer bad?

In reality, Bad Developer may not be happy with Nanny Microsoft either. How can any developer lacking psychic powers know whether or not their app will run on a later version of Windows? Nanny Microsoft is taking a chance here – balancing the desire of customers for maximum compatibility with the desire of developers for maximum safety.

Vista compatibility confusion

Vista seems to have more compatibility switches than ever before. There is UAC (User Account Control) with its registry and folder virtualization, as well as 6 “compatibility modes” for versions of Windows from 95 to 2003, and other settings like “Disable visual themes” or “Run in 640 x 400 screen resolution”.

I understand why these switches exist, yet there is a downside. Developers with apps already deployed have no control over whether users choose to run their apps with or without a compatibility mode, or even whether Nanny Microsoft has done something special just for them.

I recall talking through a particularly mysterious problem with a user on one occasion. This was in Windows XP. Somehow, one of the compatibility modes got switched on for the app that was failing. Naturally the resulting errors gave no clue as to the cause of the problem.

I hope that somewhere in the depths of MSDN is a clear description of what all the compatibility modes actually do.

This application might not have installed correctly

This brings me to a feature of Vista I really dislike. You install an app, and at the end a dialog pops up asking you whether it installed correctly. This happens before you have run it, so the correct answer is, “I haven’t a clue.” Nevertheless, Vista wants you to reinstall with “recommended settings”. What settings? I assume one of the compatibility modes above, but I’m guessing.

I always assure Vista that the app installed just fine. I’d rather troubleshoot specific issues, than have apps install with unkown compatibility switches in operation.

DIY GetVersion

If you are a Good Developer (which I presume), then you know not to trust GetVersion. The official advice is to try not to care about the Windows version. If you need to know about a particular feature, check for that feature. 

Good advice, but what if you do want to know the version? I’ve done a snippet of code for PCW for this, but can’t post it yet. It’s not difficult though, provided you are happy with an implicit “or higher”: find some feature that you know is only on that version of Windows, and check for that.

Apple to Linn Records: you can’t use Apple lossless

Alongside Apple’s well-known reluctance to allow others to use its FairPlay DRM, the company now appears to be refusing permission for others to use its Apple Lossless file format.

Although some people are content with the 128kbps lossy compression of standard iTunes store downloads, they do not satisfy audiophiles. Linn is a hi-fi company with its own record label, and is now offering digital downloads at a quality even higher than that of CD.

Linn wants to support Mac customers, but it isn’t easy. iTunes does not support commonly used codecs like FLAC or WMA lossless. Apple lossless is the obvious choice, but Linn’s Martin Dalgleish tell me that Apple will not allow it. There is also an AAC lossless*, but according to Dalgleish iTunes will only play the lossy portion of the file. Linn is now investigating WAV, which is uncompressed.

These little battles may seem unimportant, but let’s bear in mind that Apple, like Microsoft, wants to be at the center of the digital home. Undoubtedly Apple would prefer users of its hardware to buy their music from the iTunes music store rather than from independents like Linn. Controlling the formats that its hardware and software supports is a way of keeping that loop tightly controlled.

I’ll add that while I welcome Linn’s initiative in making available lossless, DRM-free music downloads at better than CD quality, there are plenty of problems when it comes to playback. If you are not careful, you may find that Windows or your soundcard’s drivers are resampling your audio anyway.

*Note: Although Dalgleish used the term “AAC lossless” such a thing does not exist (see comments to this post). However there is a project called MPEG-4 Audio Scalable Lossless Coding – see here and here, which is perhaps what he meant.

Technorati tags: , , , ,

Living with Vista Ultimate in the digital home

Now that Bill Gates has got people talking about Xbox 360 in the digital home, here’s a brief reflection on a month living with Vista Ultimate hooked up to an Xbox 360.

In truth we threw out the VHS video recorder a while back. In its place I stuck a PC running plain XP but including a DigiTV card and connected to the internet. I also ripped a bunch of CDs to the hard drive and connected the Creative Audigy soundcard to the home hi-fi. It all worked well, though the family found working with the DigiTV software fiddly. Wiring it up was complex, and there was an irritating hum from the PC, though not really noticeable when actually watching TV or listening to music.

That was then. When Vista went RTM in December I installed it on the same PC, dual booting with XP in case it didn’t work. I found a beta Media Center (BDA) driver for the DigiTV card, and another beta driver for the Creative Audigy. Then I moved the PC out of the living room, but still connected to the internet. We now use Media Center through the Xbox 360.

This means no more annoying PC hum. Media Center via the Xbox 360 looks almost the same as it does on the PC itself – large, chunky user interface for using with a remote from 10 feet back, TV guide with easy scheduling of TV recordings, access to all the ripped CDs,  and a few extras like the ability to view photos and videos.

Pros and cons

Here’s what we like. The Media Center UI is a big hit. In moments and without tuition the younger generation figured out how to record every future episode of Dennis the Menace, something they had never achieved with the DigiTV software (a true measure of usability). Another great feature is the ability to play any of your digital music while playing a game on the 360.

The whole set-up is a radical improvement on the bad old days of VHS and CDs. It changes home entertainment for the better.

Here’s what we don’t like. First, while Media Center improves on the old DigiTV software in the key area of usability, it lacks some of its features. In particular, DigiTV can record one channel while you view another, which Media Center cannot do unless you install a second card. This is not too bad in practice, since you can watch a channel on the TV’s built-in receiver while recording another on Media Center.

Moving the PC out of the living room is good – less clutter, less hum – but I miss the ability to browse the web. I gather this feature might come to the 360 at some future date.

The Xbox 360 universal remote is handy for Media Center, but it doesn’t work with the TV and in any case I’ve come to dislike infra-red. Just as wireless console controllers have replaced wired, it’s time to get rid of infra-red and use RF. Come to that, why not use TCP/IP and have a bit of intelligent two-way communication in those remotes?

And then there are the gremlins. Not too severe, and perhaps it’s the cost of living the beta driver life, though it’s hard to say. One of the oddities is that when you browse the music library the first time after a reboot, it only shows a fraction of its contents. They gradually repopulate over the next ten minutes.

On the PC, sometimes when you select an album it takes several minutes before it actually starts to play.

We also get a typically cryptic Windows Media Player error from time to time. The error dialog appears, but doesn’t seem to cause any problems.

Creative Labs is causing alarm with its Vista driver support. Here’s the dialog I’ve seen for the last couple of days:

The bad news: when you go along to Creative’s site to download an updated driver, there isn’t one. The web site says “TBA”. There’s no indication of when, or reassurance that the sound won’t just die next week.

Note that most of the above problems don’t affect the 360 side of things. That’s the advantage of consoles: fixed hardware, single vendor, solid drivers. Apple knows this too.

One other problem which did impact both the 360 and the PC. On one occasion, the TV card just stopped working. You could select a channel, but saw a blank screen. The fix was to re-do the TV settings for Media Center. Beta problem with the DigiTV driver? Maybe, maybe not, but annoying.

Finally, the complexity of setting this lot up in the home remains a worry. A lot of things have to be right: home network with ethernet or fast wi-fi; TV aerial perhaps with signal booster; various cables between TV/360/hi-fi. Don’t misunderstand me: it’s no problem for an enthusiast. However it is a lot to take on for someone who just wants to bring home a box and plug it in. I hope smart retailers will offer a home setup service for Vista/360 combos and perform it competently.

A few grumbles then, but … it’s great. We don’t want to go back.

Word 2007 clipboard slowdown

Office 2007 is a great piece of work, but there are some annoyances. Here’s one. Ever tried to grab some text from a web page and paste it into Word? I do this, using IE7, and often experience an irritating delay of up to 30 seconds or so, during which time this message appears:

“Contacting the server for information. Press ESC to cancel”. If you press ESC, nothing gets pasted. If you let it do its thing, then eventually your text gets pasted, by default with some attempt to preserve layout. I almost always just want the plain text, so I select that from the little paste menu that appears (the last vestige of smart tags).

What’s going on here? Well, the Windows clipboard is a complex and ancient Windows feature. When you copy something to the clipboard, applications may place data there in several different formats. Creating all these different formats can be an expensive operation, so there is also an option for the recipient application (client) to query the sending application (server) dynamically. In other words, the paste operation might initiate a conversation, instead of just grabbing some data and inserting it into a document. It wouldn’t astonish me if it still uses DDE, the forerunner to COM from the days of Windows 3.1.

If the paste operation is complex, you can forgive a little delay. But Word 2007 now lets you specify a default paste, which I have set to plain text. I’m confident that IE7 puts plain text on the clipboard as soon as you copy. In fact, you can prove this by copying something in IE7, then pasting into Notepad, which only understands plain text. It appears instantly. Then switch to Word 2007 and repeat the paste. You still get half a minute delay, before the text appears.

The explanation must be that Word 2007 gets all the complex formats first, and only then pastes the plain text. In consequence, even if you only want the plain text you nevertheless have to suffer the delay. The only way round it is to use Paste Special and select plain text from the formats on offer.

I guess it might be possible to write a macro to do this and attach it to a keyboard shortcut. Perhaps I’ll investigate when I get a quiet moment.

Technorati tags: , ,

Vista, Office 2007 changes: cosmetic, or not?

This is the statement that most intrigued me in Walter Mossberg’s review of Office 2007:

These changes in Office, while much less publicized, are far bolder and more important than the mostly cosmetic user interface changes in the highly hyped new version of Windows, called Vista, which comes out on the same day.

Mossberg’s reviews are not deeply technical but he represents a good example of intelligent opinion on technology issues. Is he right about Vista? I’ve puzzled a bit over what he is saying here. I think he is only referring to the user interface, yet one could argue that all user interfaces are “cosmetic” since they are about appearance in contrast to underlying functionality.

My own view is that it is difficult to describe the user interface changes in Vista as cosmetic, though I am unclear how to define what is “user interface” and what is not. This is from an MSDN article on the Desktop Window Manager:

The new Microsoft Windows Vista desktop composition feature fundamentally changes the way applications display pixels on the screen. When desktop composition is enabled, individual windows no longer draw directly to the screen or primary display device as they did in previous versions of Windows. Instead, their drawing is redirected to off-screen surfaces in video memory, which are then rendered into a desktop image and presented on the display.

That said, the user just sees windows on the screen: it is not obvious that this is so different from XP. That makes Vista’s UI changes the opposite of “cosmetic”: it looks the same, but underneath it is radically different.

How about the little search box at the bottom of the Vista Start menu? A small detail, yet once you learn that you can start Excel just by typing “ex” and hitting Enter, it becomes a big deal. I could ramble on here about search as UI. Not cosmetic.

Another change which I think falls in the UI category is that Vista now treats the user’s home directory sensibly. I ranted about this on XP. The home directory is a key part of the Windows operating system, but on XP it is hidden under Documents and Settings and both hard to find and intimidating for users. Vista promotes the home directory to the Start menu, renames the obscure Documents and Settings to “Users”, and sensibly moves things like Music and Pictures out of My Documents to the top level; it also gets rid of the annoying “My” prefix. You could argue that this is a cosmetic change, though I think it is an important one.

For sure, there are cosmetic changes in Vista. I think transparency, which Mossberg or any user will soon notice, is an example. Cool, but of little practical benefit as currently implemented. What about the way that Window key – Tab displays a 3D view of all your open applications (the update to Alt-Tab)? Is that cosmetic? Actually, I don’t think it is. If you have, for example, multiple documents open in Word and Excel, seeing the preview image makes it easier to find the one you want. The same applies to the pop-up previews on the task bar. This is information the user interface did not give us before. My vote: Not cosmetic.

I like Mossberg’s take on the new Office UI, though I still think there is more than just usability behind Microsoft’s strategy here. Yet I am still using the same Office features that I used in Office 2003. The changes are do with appearance, not functionality. Doesn’t that make the new stuff in Office 2007 more “cosmetic” than those in Vista, important though they are?

Elementary error breaks Outlook 2007 POP3 mail, say users

Users are reporting that Outlook 2007 is immensely slow for POP3 email retrieval, because of an elementary error in the way it negotiates with email servers.

Specifically, it sends AUTH as the first command after connection. The server rejects this with an error response. The ensuing time-outs and consequent errors result in much slower mail retrieval, though it does arrive eventually.

I have 8 POP3 accounts that OL 2003 used to query in a minute or two (with 80 spams downloaded). OL 2007 takes 6 minutes. Plus I reckon there are other problems in the UI threading…..

says CW in a comment to an earlier blog post about Outlook 2007 performance. Corroboration comes from user Ken in a comment to this post.

I’ve not yet tested this myself, but will do shortly. It has a kind of horrific plausibility, since everyone at Microsoft uses Exchange for email, not POP3. Therefore POP3 performance will receive much less scrutiny, though you would have thought that the wider beta testing would have picked it up.

I think we will here a lot more about Outlook 2007 performance issues in the coming months, unless Microsoft comes up with a speedy fix for this and other problems.

Update

I’ve run some tests of my own and looked up some RFCs, with a little help from the microsoft.public.outlook.general newsgroup.

I tried Outlook 2007 with two POP3 servers. One is dovecot; the other is also running on Linux though I’m not sure which POP3 daemon it is. With dovecot, my ethernet trace does show a sequence similar to the one the above users are complaining about, something like:

Server: +OK dovecot ready.”

Client: AUTH

Server: -ERR Unsupported authentication mechanism

However, there is no significant delay introduced; it goes right ahead with user and password.

On the other POP3 server AUTH is again sent, but this time does not trigger an error.

There is something that puzzles me though: according to RFC 1734 AUTH should be followed by an authentication mechanism, not left without an argument. And there doesn’t appear to be any need to send AUTH at all in the standard plain setup.

The lack of an argument would explain the error the other users saw:

Server: -ERR An authentication mechanism MUST be entered

May be an email guru can tell me definitively whether Outlook is in the wrong here. However, it strikes me that the problem is only making a minor contribution to the poor performance. Even the timeout of 3 seconds which the user CW refers to is hardly going to make a huge difference.

That said – the fact remains that Outlook 2007 does have performance issues.

Using MSBuild from the command line

Now that the holidays are over, here’s some hardcore tweakery for Visual Studio 2005 developers. Visual Studio 2005 includes a completely new build system based on XML build files and a standalone build utility called MSBuild. Visual Studio project files are in fact MSBuild files. Open them up in a text editor and you’ll see that they begin like this:

<Project DefaultTargets=”Build” xmlns=”http://schemas.microsoft.com/developer/msbuild/2003″>

You can also build entire solutions from the command line. Just open up a Visual Studio 2005 command prompt (an easy way of setting up the correct path and enviromental variables), navigate to the project directory, and type:

msbuild yourapp.sln

This is NOT dependent on Visual Studio, since MSBuild is actually part of the .NET Framework redistributable package. This means you can take your project files and build them on machines that don’t have Visual Studio installed, which can be handy for servers.

But what if you want to edit the solution build file? Curiously, solutions are defined in .sln files which are not msbuild files. When you run MSBuild against an .sln file, it actually creates a new in-memory build file for compilation, making it hard to edit.

This is where the tweak comes in. If you define the enviroment variable msbuildemitsolution, then MSBuild generates the solution build file and leaves it there for you to edit. It is given the name yourapp.sln.proj. For the next build, you can run msbuild against this file directly, thus incorporating any manual changes.

Why it works like this, who knows? Still, it’s an intriguing tip and as you can guess I didn’t discover it by accident. I got it from Sayed Ibrahim Hashim’s excellent blog. He is the author of the MSBuild/ClickOnce book Deploying .NET applications. I haven’t seen the book, but I recommend the blog if you want to know more about msbuild; the book is likely good as well.

Technorati tags: , ,