I have an Mac/Win application that performs well on Mac, relatively well on some Windows systems and absurdly poor on several Windows machines.
I'll start with the results, time it takes to generate a report. To get final result, my applications reads records from disk and caches some intermediary results back to disk. So it comes down to read and write operations.
MacBook Air (SSD disk) - Mac version - 5 seconds.
MacBook Air - MacOS in VMWare (single core used) - 12 seconds
MacBook Air - WinXP in VMWare (single core used) - 35 seconds
NoName Box, cheap c2d, Win7 Home - 10 minutes
HP Intel Pentium 2.8 GHz, Win 8 Pro - cca 45 minutes
My friend's Win7, some Intel with 4 cores, normal HDD - 25 seconds
This looks crazy. Insane time differences. It's the same code, only platform specific calls are different. On Windows it comes down to CreateFile(), ReadFile(), WriteFile(), SetFilePointer() etc.
On my system I have downloaded FileMon utility by Russinovich and when I look at the activity I can see READ, WRITE, LOCK, UNLOCK calls and they're all marked with SUCCESS. Reads are in shared files, that's why there are locks. The cache file (used for writing) is exclusive, so there are no locks on it.
Next time I have access to the Win8 computer I'll look at it with FileMon, but I'd like to know if there's any other tool that could tell me what is going on.
That computer was bought this friday. They had a bit older Win7 machine (in above tests it's a 10 minute machine) and I was telling them it's a slow computer and they should buy something better. Ha!
This friday they called me and we tried the report and I was perplexed and ashamed at the same time as it is my application and I don't have the slightest idea why it runs so slow. This new Win8 box is again a cheap box (cca 400 EUR + TAX), like I said above, some HP with Intel Pentium at 2.8 GHz, not sure about other specs.
That's why I'd like to test it somehow and see why is my application so painfully slow. How could performance on any modern hardware be so much different? Five or 25 seconds vs 45 minutes. How can this be?
Any suggestions for other tools or maybe some system calls I can put in my own code? Any good disk benchmarking tool that can monitor live disk performance in other applications?
Edit - It's a rather old application that I still maintain, but don't change the basics at all, so it's a 32 bit process on both platforms.