Monday, May 15, 2006

Boosting priority of Visual Studio .NET compilation




Long, long, long time ago a trick was published on CodeGuru, letting you to decrease priority of the compilation process (cl.exe) spawned by VC++ environment.

Build process is a relatively resources-consuming task and those days - running a big build was almost freezing your computer for hours, hardly letting you to browse an internet site in the background.
So, the trick was to look for the combination of CREATE_NEW_PROCESS_GROUP and NORMAL_PRIORITY_CLASS flags (together giving a value of 68 00 02) in the vcspawn.exe process and then change 00 02 into 40 02, which is the value of IDLE_PRIORITY_CLASS (actually it's 0x00000040 - so you getting 40 00 after you swap its bytes to fit physical representation in memory).

Now, today I encountered an absolutely opposite problem: we have a dedicated "daily build" machine, which only purpose is to run daily build, unit tests and pack daily build installation. I noted that a big span of time required for this whole process to complete is spent by compilation (cl.exe).
So I wanted to increase its default priority and this way to speed up whole build process.
Well, the old trick still works - all you need is to look for 68 00 02 in vcspawn.exe and change it to 68 80 02 (HIGH_PRIORITY_CLASS).


Sunday, April 30, 2006

Turn Google Desktop into multisite search tool




Actively using Google Desktop on my own computer I thought how nice it could be if there was kind of mini-Google search engine running in my organization, letting to search across document servers, intranet and may be even in explicitly specified shared locations on another computers. Just think about finding Travel Policy.doc in one click instead of browsing dozens of folders in HR directory on the doc's server. Or looking for a piece of code written by you (or someone else!) just by clicking something like
RemotingServices.GetLifetimeService()
in the desktop search screen.

Even more - having few computers connected by LAN at home - it could be great to have a possibility to search across all of them, instead of chasing for some lost .doc file on each computer apart.

Well, for the first part (the Enterprise mini-Google) - it's actually offered by Google itself for as much as £1,995.

Btw, Google Desktop per se offers some kind of that functionality, but in a different aspect - for users who have a GMail account - it provides "Search Across Computers" service. The concept is that data on all your computers is indexed and stored in a centralized location (somewhere in the deeps of Google servers), thus enabling you to search it from any of your computers. The problem here is that you passing indexed content of your computer over the internet and storing it at server which belongs to, yet reliable, but still - 3rd party side. And it's kind of disturbing, despite in reality - most of computers are exposed to so many treats, anyway, that passing this index over the net is really the last thing to worry about.
Btw, the index could be encrypted, selecting the following option in the Desktop Search options (and slowing search a bit):




Anyway, it's good for corporate, but a bit expensive for the home user.
So, after browsing around here and there - I've found that there is a solution for that, which would even keep all your indexes local, without letting them leave to the deep sea of the internet.
No hacks needed - you are two plugins and few configurations away...

As said - you'll need to install two plugins first of all. First one is DNKA and the 2nd is TweakGDS. Select one of your home computers that would serve as 'Google-home-server' and install both plugins on it.
(Do you know there is a whole set of extensions for the GDS, all available here?).

I. In Tweak GDS:
1) Define where you would like to keep index of the crawled files:


2) Define how much result-per-page you want to see:



II. In DKNA:
1) Define which computers allowed to access the 'server' GDS computer:

Please note that dragons possible security breach lies here. DKNA works as web-server, listening on the port 4664 and redirecting requests from computers with allowed IP's to the local GDS service. Since requestor could provide a fake IP address - it could generally be a possibility for hacker to make GDS searches on you PC...

2) So, it would be good idea to disable anonymous access and define users allowed to access the GDS in the DNKA Users setup screen:



3) Finally - you may review access log (Misc Options of DNKA Options screen) from time to time.


III. The last thing - is to configure your GDS (below):
1) You need to make sure the GDS plugin is enabled.
2) If you want to crawl any network locations - add them in "Search These Locations" section.
3) In "Don't Search These Locations" add both http://127.0.0.1 and http://127.0.0.1:4664 to avoid duplicate results in your search.
If you computer would server explicitly for search - remove its drives from the search locations.
4) It's a good idea to encrypt indexes anyway.



Two final remarks:
1) I can't bet this solution is hack-proofed, if you are concerned about security.
2) I wonder, whether it would continue to be available, since Google would probably prefer people buying their Google-mini/enterprise solution instead...


Thursday, March 16, 2006

Google Mars




Once I really liked the Google Earth. Now - oh, my - Google Mars.
Look to those 'rivers' ( Mars Bay )...
Now I understand that futuristic joke where you'll look in to the google when driving your google on your way from the google to buy a bit of google...


Tuesday, March 07, 2006

Never install .NET SDK 1.1 where VS 2003 installed




Don't ask me how I got to it, but I installed .NET Framework SDK 1.1 on my computer, which had a previous installation of VS 2003 on it.
(The VS 2003 itself has .NET Framework SDK 1.1 as part of its installation, so you don't need to re-install it).
Even worth - after you install the SDK after VS 2003 - you wouldn't be able to compile any project, receiving error message in style of:


Build log was saved at "file://d:\MyProject\BuildLog.htm"
1 error(s), 0 warning(s)

It seems that there is no resolution for that, despite here and there people claim that it could be fixed by elimination of HKLM\Software\Microsoft\Command Processor\AutoRun key.

As for me - I was able to fix it only by running repair of VS 2003 .



Monday, March 06, 2006

RE: Are we getting too addicted to RSS feeds ?


[Via Jackie Goldstein's Weblog]
Probably the best RSS aggregator ...






Sunday, February 26, 2006

10 must-have Visual Studio add-ins




An interesting article, published in the last issue of MSDN Magazine - Visual Studio Add-Ins Every Developer Should Download Now. The article lists some very useful VS add-in tools. For me - few were new, so some could be new for you too!