Archive for January, 2014

Upgrading my HP Envy m6 to SSD

When you upgrade to an SSD, likely you want to clone partitions.

At least in my case, don’t try to do this in Windows. I had my SSD connected via USB, and Windows kept disconnecting the USB disk when I tried it halfway through the process.

Download yourself a copy of Macrium Reflect free ( http://www.macrium.com/reflectfree.aspx ), and then burn the recovery disk. Yes, the recovery disk can clone the drive. I burned it to a DVD disc and booted into it.

I can’t see my SSD! Don’t panic. This took awhile (a few minutes, maybe?), be patient. Eventually the SSD should show up and/or you can use the “refresh” option until it shows.

Macrium says my partitions wont fit! Don’t panic. Tell it “ok”, and you should see the partitions that DO fit. Assuming you made enough space available, “edit” the partition options for the partition that is too large and shrink the side until there is enough room for the recovery partition, etc. In my case, I left about 31 gb free. Then I dragged the recovery partition down to the SSD and selected to move to the next step.

If you did this right and everything went perfectly, you should just be able to boot straight into the disk without changing any options. 🙂

, , , , ,

Leave a comment

SPA app startup with an HTML page

I wanted to try starting my application at the root, which is an SPA, with an HTML document. I was curious to see if it would make a substantial difference to the “cold start” of an application. I guess you could also do this if you just want to stick to a durandal/angular/etc. front-end and only use MVC / ASP.NET for AJAX calls. This setup is likely not practical for most applications.

Anyway, I had these conditions:

  • An extensionless URL (mysite.com/splash instead of mysite.com/splash.html)
  • Start from the root of my application (not necessarily the root of the server), regardless of virtual directories/etc. (mysite.com/app or mysite.com/)
  • Preserve all of the rest of the MVC routing

One of the most helpful posts on this topic is Scott Hanselman’s “Redirecting ASP.NET Legacy URLs to Extensionless with the IIS Rewrite Module” blog post. Don’t forget to install the module, as I did (haha, RTFM), lest you receive a 500.19 error. Hanselman mentions it, but the link is here. He had a different purpose in mind, though.

This is the rule I came up with:

<rewrite>
<rules>
<rule name=”Splash” enabled=”true”>
<match url=”^$” negate=”false” />
<action type=”Rewrite” url=”{PATH_INFO}/splash.html” />
</rule>
</rules>
</rewrite>

As I understand it, the URL “^$” means “empty string”, the “{PATH_INFO}” has the path information the request came from (ie: mysite.com/myapp should preserve the “/myapp” part).

So, this works! How long does a request take?

  • With or without rewrite (mysite/app/splash.html vs mysite/app) a “Hello World” html document about 2.65~ sec
  • MVC’s “Home / About” sample came back in about  4.7~ sec.
  • Rendering one of my preexisting partial views with database interaction took almost 10 sec.

Obviously, subsequent requests for all of these were crazy fast. To ensure that these tests were fresh, I turned off caching in Chrome with dev window open and hit CTRL+F5 right after an IISRESET.

Leave a comment