Aug 31, 2012

How to improve Visual Studio performance


In this series, I’ll discuss how to the steps that I did to improve VS 2008/2012/2012 performance. Following these guidelines, I managed to reduce build time from +10sec to 3-5sec , and solution opening time from 20+ sec to just mere 5sec.

For some may think “a few sec ain’t a big deal”, I would like to stress: it’s really make a different when you test & debug. Anyway, what else will you do when VS is compiling ? Thinking of what to do with your life ? Smile. Life’s better when you can cut down build time and spent that on other hobby (for me it’s building performance workstation-  I just upgrade mine to 16GB DDR3-2000Mhz with RAID10 SSD ^^ )

OK enough chit chat, now back to the main point.


Before proceed with the guide, ensure that your machine meet these minimum requirements:

  • At least 2Gb free memory.
  • Core2Duo 1.8Ghz (dual-core) or equivalent AMD multicore.
  • At least 5Gb free HDD space.


a. First, if you have lots of RAM (4GB+ ), you can use Ramdisk to create a separate partition, then map your output folder to it.

I downloaded Ramdisk , then install it. Using the tool, I created the symbolic link from the VS output folder via mklink :

C:\mklink /D "F:/RamdiskTemp/Src/bin" "C:/Work/Web/Src/bin"
symbolic link created for "F:/RamdiskTemp/Src/bin" <<===>> "C:/Work/Web/Src/bin"

b. Use the same mklink tool, create symbolic link for your ASP.NET temp folder, point tothe newly created Ramdisk.

The ASP.NET temp folder (for .NET 4.0) is at :

C:\windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files (64bit)

C:\windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files(32bit)

c. Use eBoostr to implement cache at OS-level for your VS. I used 512MB of memory to cache.

Detail of how to use eBoostr, please refer to their website.

<<to be continue>>

Aug 30, 2012

How to detect what JavaScript function is hooked up to an element


Recently I worked a lot with front-end development, and most of the time I want to know what JavaScript function is fired when I clicked on some buttons or images.

Luckily with Chrome, it is so easy.


In Chrome, press F12 – it will open developer tool. Now right click on the element and select Inspect element. In the developer tool, look for the right hand side and expand Event Listeners. Tada, there you go – all the events that hook up to that element are shown. See the image below:


Aug 27, 2012

How to remove deleted songs from iTunes Library


Here are the instruction:

  1. Create a smart playlist with the criterion “Artist” is not “xxxyyyzzz” (or some other random string that does not occur as artist in your mp3 collection). Then name this smart playlist “all entries”. This way, we get a smart playlist with all database entries, working and broken.
  2. Create a static playlist called “working entries”.
  3. Open the “all entries” playlist, select all (ctrl-a/option-a) and drag the selection to the “working entries” playlist. iTunes will not copy dead entries, so now we have a list with everything and another with only the working ones. We need to substract them from each other. This is how:
  4. Create a smart playlist with the following criteria: “Playlist” is “all entries”, “Playlist” is not “working entries”. Check that all rules apply, not any rule. And dang! We just created a playlist of broken database entries. In this playlist, select all (ctrl-a/cmd-a) and hit shift-delete (alt-backspace on macs). iTunes will ask you if you want to remove the selected items from the iTunes library. Of course you want to!

from this blog.