I recently upgraded one of my staging servers to Ubuntu 12.10 (aka Quantal). That’s great, except my production servers are still on Ubuntu 11.04. The idea behind having a staging environment is to match production as closely as possible. So, my choices are (a) upgrade my production systems, which is a good idea but risky, or (b) downgrade PHP on my staging servers. For various reasons relating to time and cost, I decided it would be best to temporarily downgrade PHP on my staging servers.
Over the past few days, one of my C# projects started debugging unusually slow. “What could be the cause?” I asked myself. It could be any number of things. I recently upgraded to Windows 7. Along with the upgrade, I changed to x64. I’ve marched along the forced upgrade path to IIS7. Any and all of these things could be causing a slow down. So what did I do? What any good techy does in hopeless situations: I Googled.
There were lots of tips and suggestions. I tried them all, one by one with no success. One of the more complete threads I found is over at visualstudiodev.com.
As an update, I found an even better fix so you dont’ have to lose any functionality in VS 2008. This also drastically improved performance (response time) for me in SQL server management Studio. In Internet Explorer 7…
Tools->Internet Options->Advanced->Security Node->Uncheck ‘Check for publisher’s certificate revocation*’
Once I did this, like magic, VS 2008 works great even with ‘Enable the Visual Studio hosting process’ checked and SQL Server Management Studio’s response time was almost immediate. It is a good day! My theory is the corporate network I am in is blocking certain ports (out of my control), and thus certain ‘behind the scenes’ requests are timing out, causing the delays.
This didn’t work for me, but it looks like it helped a lot of people. I’d suggest trying it out. At the very least, it will cut down on come unnecessary traffic.
Debugging still ran painfully slow. It often took 20 seconds to half a minute to load all my assemblies before even attempting to step through code. Back to Google.
This time, I came by a fairly limited Stack Overflow response. No answer was selected as correct, but one had enough votes to make a read worthwhile:
You may need to delete all your breakpoints—note that you need to click the “delete all breakpoints” button (or use Ctrl-Shft-F9), NOT just delete them one by one. If Visual Studio has mangled your solution settings the latter will not work. You may need to add a breakpoint first, in order for this to work (clever, eh?).
If worst comes to worst, you may need to delete your
.suo file and let Visual Studio start a new one from scratch. Note that you will lose your personal solution configuration settings, however (only for this solution, not any others). However, you may want to move/rename the file temporarily until you determine whether or not this is the problem; that way, you can always move it back. I have seen some online resources recommend deleting (moving/renaming) the
.ncb file as well.
I tried it. Success! Who would have thought removing all breakpoints (adding some if you have none) would rebuild the solution file? I was rather upset to have lost my carefully crafted hundred or so breakpoints, but the speed increase makes up for the loss in spades.
I’ve posted about this issue before in previous versions of Visual Studio, which received a very helpful response. The newest version of Microsoft Visual Studio 2010 didn’t ship with emacs support. This was later remedied by Microsoft with an emulator. Great.
Don’t get me wrong; I’m very happy about the emacs support. I was happy enough, in fact, that I upgraded to the new Visual Studio. Even so, the emulator isn’t perfect. There are a lot of things broken. Notably, the expected behavior when pressing Enter or Tab.
Emacs doesn’t support auto-line indenting (at least out-of-the-box). Indenting happens depending on the language file loaded, any custom settings, etc. Microsoft emulated this behavior. When hitting Enter in VS2010, a newline appears and the cursor sits contently at the beginning of line point. I find this rather irritating!
To fix this, I had to settle on breaking a few other things (more on that later).
- Tools ->Options… -> Keyboard
- Under “Show commands containing:” type “EmacsBreakLineIndent”
- Click “Edit.EmacsBreakLineIndent”
- Select “Text Editor” under “Use new shortcut in:” (if not already selected)
- Highlight where it says “Press shortcut keys:”
- Press the Enter key on your keyboard
- Click “Assign” and “OK”
Another annoyance is emacs keybindings with snippets. They don’t work. I haven’t figured this one out yet. If I do, I’ll be sure to post back.
Basically if you don’t already know, snippets are quick auto-fill type things that help compete common tasks. If you begin typing “for” and auto-complete shows a snippet icon, hit tab twice to see what it’s suppose to do. You can try it, at least, with default keybindings since it work work with emacs.
I’ll see if Microsoft Connect can shed some light on this issue and post back. (Vote here is you’re interested in getting this fixed.)
I’m not a huge fan of emptying the trash on my laptop. There’s really nothing too important on it anyhow. But this evening I felt like a little new year cleaning would be appropriate so I clicked the only option I had: “Empty Securely”. To my surprise, I had about over 200k items to be deleted.
It took about two hours before I finally gave up. There’s nothing important in my Trash, I just want the free space. Enter Terminal.
It’s pretty simple to remove most empty files quickly.
(Applications / Utilities / Terminal.app)
- Ensure that you’re in the correct directory by typing:
rm -rv *
Make sure to replace <name> with your logged in user name. If you don’t know you’re user name, you can get a list of all users by typing: ls /Users/
You’ll see a list of files fly by! It’ll go much faster than securely emptying the trash.
That’s it! Enjoy the free space!
Please note: This does not do a “secure delete” and only removed the file record. All the data is still there so anybody with enough know-how can recover the files.
Also, you’ll only be deleting files for your own user account. You can delete from other accounts … so long as you have access.
I was shocked and delighted today when I found an ad on cnet.com for Sid Meier’s Civilization 5 (who says nobody clicks on ads)! Who know it came out about two weeks ago? I didn’t.
I’m not somebody you would call a “gamer,” but I do enjoy my fare share of strategy games. I’ve been a long [...]
I recently needed to block older clients from our corporate Subversion repository. It turns out merge history (which was introduced in SVN 1.5) isn’t stored property in older clients and can really be reliably counted upon from 1.6.6 and up. We had a requirement to mark 1.6 clients (earlier than 1.6.6) read-only, and deny earlier clients [...]
I have to admit that I like Visual Studio. Well, ok, I like Visual Studio 2008. The newest version (2010) sucks!
For some reason, Microsoft thought it was a great idea to re-write the entire back-end. As such, they dropped things with “low popularity” for “higher priorities.”
What, exactly, am I so angry about? Emacs key-binding support. [...]
I’ve been using GoDaddy for years. When I started using them many moons ago, they offered cheap hosting and domain registrations in what was a generally expensive market. I purchased my first .COM and .NET domain for ~$3.95 each. Years later, all GoDaddy hosts is advertisements for their useless or misleading products.
All I want is three [...]
I had such a hard time finding this song that I thought I’d provide a download for the masses here. Hopefully it doesn’t stir up any issues; it’s a great song.
[ Josh Gabriel presents Winter Kills - Deep Down ]
They say, they say
We should have known better than to
fall so deep down, deep down
into this rabbit [...]