# Friday, May 29, 2009
I've got my Dell Studio XPS 16 laptop up and running the Windows 7 RC.

Stats:

XPS 1640, Intel Core 2 Duo P8700(2.53GHz/1066Mhz FSB/3M L2 Cache)
Obsidian Black High Gloss Finish with Leather XPS 1640
4GB, DDR3, 1067 MHz 2 Dimm forXPS 1640
16.0 inch Wide Screen 16:9 1080p FullHD RGBLED LCD W/2.0 MP, XPS 1640
ATI Mobility RADEON HD 3670 - 512MB
320GB 7200 RPM SATA Hard Drive
Microsoft Windows Vista with SP1 Home Premium Edition 64-bit Edition English
8X DVD+/-RW Slot Load Drive for XPS1640
Integrated High Definition Audio 2.0
Intel WiFi Link 5300 802.11AGN Half Mini Card
56 WHr 6-cell Lithium Ion P Primary Battery, for XPS 1640
Warranty Support,1 Year Extended
Dell Wireless 370 Bluetooth Internal (2.0+Enhanced Data Rate)
Premium HD WLED Display Obsidian Black, Leather 2.0 MP Webcam
Dell WebCam Central 1.0 XPS 1640

Total with Tax: $1,698.46

I've always noticed that when I'm using my laptop (the old one, or even this new one), if I am waiting for anything, it's the hard drive. Despite my heavy development work, the CPU is seldom the bottleneck for me.

Here's a benchmark of the hard disk from HD Tune:



The average Transfer rate is 60.8 MB/sec and the Access time is 24.4 ms. So I sped it up by replacing that HD with an Intel X-25M SSD. Check out the new numbers:




Wow, a 100% improvement in Transfer rate, and a ridiculous improvement in Access time! But this is not the full story. When you're using your computer, the operating system is not usually streaming long contiguous bytes. It's making TONS of teeny tiny little random reads and writes (click here for my source). SSDs are better at this and the Intel X-25M is the highest MLC performer (click here for my source), although OCZ has a great offering.

So let's take a look at those random reads. Here's the data for my Studio XPS 16 with the stock hard drive:



It's doing about 30-40 operations per second, regardless of the transfer size. Remember, your OS does a lot of things at once. It's shooting all over the platter of your hard disk, getting little bits of information. And each time it wants one of those little bits, it needs to move a little arm, and wait for the disk to spin to that spot! But SSDs do not have that limitation. They can read RANDOMLY as quickly as they can read CONTIGUOUSLY. Take a look at that same laptop with the X-25M installed!



Yes, it is literally ORDERS OF MAGNITUDE faster. And you will notice this speed as you boot up faster, log in faster, and launch applications faster.

But, to be fair, SSDs have their limitations. They are notoriously slow when it comes to WRITING. As explained in Andand's article, each time you want to write or overwrite data, you need to perform an erase operation (unless the disk is brand new or was recently wiped). SSD write speed used to be pretty bad, but Intel has raised the bar with the X-25 series, bringing it at least on par with hard drives in most situations. OCZ still has some issues with random writes, but they are improving.

Another SSD limitation is that they wear out more quickly. You can only flash a cell so many times. SSDs wear out faster than Hard Drives. The SSD controller is smart enough to spread your writes evenly throughout its structure, but even then, it will still wear out faster than a hard drive.

Finally, SSDs are far more expensive than hard drives.

Nonetheless, this is the beginning of the end when it comes to hard drives with regard to use as a system volume.
Friday, May 29, 2009 12:12:47 PM (Central Daylight Time, UTC-05:00)
# Wednesday, May 20, 2009
I noticed that my web app, which makes anywhere from one to many MySQL connections per page was running slowly on my new Windows 7 RC laptop. I used dotTrace to compare the page execution to that of my desktop (which runs the app very quickly) and noticed that it was all the MySQL connections that were taking 10x to 100x as long to execute on the laptop.

After a bunch of troubleshooting I finally determined what was causing the performance problem. It was Nod32 4.0. I couldn't just disable Nod32, though. I had to completely uninstall it to cure the MySQL ODBC slowdown!

With Nod32 4.0 installed, some pages were taking 13 seconds to execute.
Without Nod32 4.0 installed, those same pages were taking less than a second to execute.

I observed this behavior on two systems:
  1. Dell Inspiron E1705 w/ Windows 7 RC x86
  2. Dell Studio 16 XPS w/ Windows 7 RC x64 (happened with both 64-bit and 32-bit ODBC drivers, and with both 3.51 and 5.1 versions of each)
Both systems have Windows 7 so this could be a problem only for Windows 7 users with Nod32 4.0. Maybe it's fine with Vista or some other anti-virus application. I hope this helps someone because it took me FOREVER to figure out it was Nod! I sent their support an email explaining all this. Hopefully they will write back with some info. Aside from this, which is a DEALBREAKER, I love Nod32 :(

Wednesday, May 20, 2009 1:02:25 AM (Central Daylight Time, UTC-05:00)
# Wednesday, May 06, 2009
I have a client that needed a text change made in an asp.net web app. Should be easy, right? The problem is that it's an old app, the text was hard-coded in the VB, and the source code is long gone! So how do you edit text that is already in a .NET DLL?

.NET Reflector to the Rescue!
  1. Get .NET Reflector and install it.
  2. Use .NET Reflector to open your assembly.
  3. Expand your assembly, and look for the class that represents the page you would like to edit. In my case it was "viewprintnotice", which represented "viewprintnotice.vb".
  4. Expand that class and click the method you guess the text was set in. I guessed Page_Load.
  5. Right click it and Disassemble.
  6. Did you find the code where the value was set? If so, take note. If not, keep digging until you find it. You can't make the change here, though. To actually edit, you need a plug-in.
  7. Download Reflexil.
  8. Install it.
    1. Close .NET Reflector (this step may not be necessary, actually)
    2. Drop its files into the .NET Reflector directory.
    3. Open .NET Reflector.
    4. View > Add-Ins.
    5. Choose Add, and double-click Reflexil.dll.
  9. Enable Reflexil by going to Tools > Reflexil.
  10. Navigate back to your assembly's class's method that set the text.
  11. Find it under Reflexil's Instructions tab. This may take a bit of digging.
  12. Right-click the instruction, click edit, and make your changes. Update your changes.
  13. Navigate to your dll and click it.
  14. Reflexil will let you save it!
  15. Save it and drop it into your server's bin directory and you've made your text edit.
  16. Take a shower because what you just did was dirty.

Wednesday, May 06, 2009 4:50:11 PM (Central Daylight Time, UTC-05:00)