Tip/Trick – Visual Studio to behave more like Eclipse (productivity boost)
- Rock Scroll – Text Highlight with an enhanced scroll bar. Very neat tool to help you visually locate where a variable is used along the code: http://microsoftdev.blogspot.com/2008/05/rock-scroll-visual-studio-plugin.html
- Quick Open File – create a shortcut that you like and voila, you can quickly access any file in your project: http://kutny.net/vsopen/
More to come. Cheers!
Optimizing Ubuntu Linux to minimize possible SSD problems
Here are other tips on optimizing your Ubuntu Linux to minimize possible SSD problems. I still have some concerns about SSD stuttering and limited life-span, but I hope that following the instructions below I will minimize these problems:
- Using noatime and nodiratime
UUID=da949f54-f6a5-4dd3-a293-8b2925834baf / ext4 noatime,nodiratime,errors=remount-ro0 1
- Setting up ramdisk on heavily used temp folder:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /media/ramdisk tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/run tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/lock tmpfs defaults,noatime,mode=1777 0 0
- Changing I/O Schedule to “deadline”
Source: http://www.ocztechnologyforum.com/forum/showthread.php?t=54379
So far, no problems.
ASP.NET Development server slow on Windows Vista/7 with Firefox or Chrome
While developing an ASP.NET website running it on the Visual Studio ASP.NET development server I was noticing that page loads exceedingly slowly in Firefox and Google Chrome after upgrading to Windows 7 (same issue occurs with Windows Vista).
A page refresh would usually take up to 3 seconds (localhost) even without changing the source code (so it should be instantaneously, especially now that I’m using a SSD).
It appears that there is some kind of bug on Vista/Windows 7 with DSN and IPv6, but that can be easily fixed. Here are some of the solutions I have found:
1. Recommended Solution – machine wide: uncomment the localhost address in the hosts file (%WINDIR%\System32\drivers\etc\hosts): (source)
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
# ::1 localhost
# localhost name resolution is handled within DNS itself.127.0.0.1 localhost# ::1 localhost
2. Firefox-only solution: disable IPv6
1. Type about:config in the address bar and press Enter.
2. Scroll down until you find network.dns.disableIPv6.
3. Double-click on it to change its value to true.
4. Restart Firefox.
3. System wide-configuration (option 1): Disable IPv6 Random identifier
netsh interface tcp set global autotuninglevel=disabled
4. System wide-configuration (option 2): Disable IPv6 from Your LAN Interfaces and Connections
1. Launch Vista, click on Start, and then click on Run. Once the Run window appears, type regedit.
2. Once you have accessed the registry, you will add a registry value as follows: (DWORD type) Set to OxFF.
3. The registry is as follows: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters\DisabledComponents
First impressions: Solid State Drive (SSD) vs 7500 rpm HDD
So, my first impressions on SSD? It’s damn fast! Let me say that again, IT’S DAMN FAST!
Seriously, I’m talking about at least 10x faster… Check it out:
- Boot time on Ubuntu 9.10 (disregarding BIOS initial checkup time)
- 7500 rpm HDD: ~160 sec
- OCZ Solid Series 60GB SSD: ~20 sec; (what?! yes, your read correctly)
- Copying Files (ex: typical video of 600 MB)
- Before, with a “fast” 7500 rpm HDD: a lot… no need to mention, it was pretty lame…
- OCZ SSD: 12 seconds!
- Firefox Browsing / Overall Impression:
- Opening tabs, clicking back and other things are now instantaneous with SSD.
Check out this vid to see a guy doing a boot time test on a Ubuntu with SSD: Booting Ubuntu 9 04 with SSD
Even if you’re on a budget,you can start with the entry-level OCZ Solid Series…
Nowadays you can get one for less than $150 bucks… Here is where I got mine:
Based on some Internet reviews I thought this one would be too slow compared to the other options (i.e. Vertex), but It’s like comparing a Porsche 911 to a Bugatti Veyron, both are extremely faster than my Honda Civic
Happy shopping!
Speeding up build times in ASP.NET with RamDisk
Here is another quick tip on how to speed up build times on your ASP.NET website projects: create a ram-based drive (i.e. using RamDisk) and change your default “Temporary ASP.NET Files” to this memory-based drive.
Then every time you change your ASP.NET pages (or any code-behind or reference DLLs) the build will happen much faster because is doing all in memory.
So, how you do this? Simply follow these steps:
1) Make sure you have enough free memory:
Open the usual apps you use (i.e. Visual Studio, Outlook, etc) and check how much free memory you have (Task Manager -> Performance -> Physical Memory -> Available).
So, let’s say you have 500MB free and your total memory physical memory is 2GB (Task Manager -> Performance -> Physical Memory -> Total). The total I’d recommend allocating for your virtual drive would be half of your free memory, or 250MB.
If you’re short on free memory, try running some cleanup tools like TuneUp Utilities (very good, but paid) or CCleaner (free). Besides that, you can always check what services are running and stop/disable the ones you really don’t need (this is a delicate step, be careful not to stop essential services – use Google to find out what’s essential and what’s not).
2) Install RamDisk
I’m using a free implementation that can be found here. You can follow these steps for a details explanation of this tool and installation instructions.
Make sure you install it and create a drive letter (i.e. “R:”) with the disk size amount calculated in the previous step. If you over-allocate it, your Windows will run out of memory and the whole purpose of this idea will be worthless.
3) Change your default “Temporary ASP.NET Files” folder to your new ram-based drive
Here you have two options. You can do this only for a specific site or for all projects running on your computer. If you have too many sites you may run out of disk space in your ramdisk, so choose your option wisely
3.1) Configuration for a specific website (local settings):
Change your site’s web.config “compilation” property to specify the new path. Below is an example that assumes “R:\ASP_NET_TempFiles\” as the new ram-based folder location:
<system.web>
....
<compilation debug="true" tempDirectory="R:\ASP_NET_TempFiles\">
....
</compilation>
....
</system.web>
3.2) Configuration for all ASP.net websites (global settings):
To implement this globally all you need to do is change your global web.config (which is usually located somewhere like this C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config)and adjust the compilation properties the same way the local settings (previous example):
<system.web>
....
<compilation debug="true" tempDirectory="R:\ASP_NET_TempFiles\">
....
</compilation>
....
</system.web>
And your done!
Two last tips I can give you is to keep an eye on the usage of your ramdisk folder. If it get’s full, you’ll have to manually delete some old temporary files. The second tip is to watch how your free memory, if it gets too close to it’s total it might indicate the you either have too much programs running or you might have to reduce your ramdisk size.
Happy speed building!