April 17, 2009

How I Got Sitefinity To Scale (Code)

I've got a new Sitefinity website going live on Monday, April 27.

For the most part, I've really enjoyed Sitefinity. I've liked it so much that I'm going to be wiping my existing site this summer and replacing it with a Sitefinity CMS-based system...but there was one problem with Sitefinity that kept hitting me: scalability.

Sitefinity was designed for small- to mid-sized sites, and for that it works admirably. However, once you start getting above about 2,000 pages, while the visitor-facing portion still performs admirably, the admin side starts to fall to pieces. The new site has over 9,300 pages. You can imagine the problems.

I don't have enough time right now to go over the specifics about why this fixes the problem, but I do have time to share the code. This fix only fixes the "Pages" view, but given that is where most user time is spent here, it was the proper place to focus.

Note: the project linked below will require that you update the assembly references. It also isn't the highest quality...a lot of it is Reflector-then-hack. However, it reduced load time on the Pages view from over 4 minutes to 10 seconds, so I'm a happy camper and so are my users.

Some restrictions placed on users: users are not allowed to create new base-level pages, and only the 500 most recently edited pages are queried for the "All Pages" views.

This is unsupported, use at your own risk.

(http://hosted.romsteady.net/SitefinityScaling.zip, 153,346 bytes)

April 10, 2009

Why attack evolution?

For the longest time, I was trying to figure out why fundamentalists were attacking evolution. Most fundamentalists don't take their holy texts literally. You rarely see them advocating that schools teach the flat earth theory (Isaiah 11:12; Revelation 7:1). You don't see them fighting blood transfusions (Leviticus 17:10-14; Acts 15:20, 28, 29). Most of them take and enjoy what science provides...so why fight this one school?

The answer was startlingly simple. They fight evolution because it goes against the central tenet of their faith...than Man is a special creation.

The fringe elements of the texts can easily be blamed on the failings of man transcribing the will of their Gods, but the core of nearly any religious belief system is that people are a special case and evolution shows that we aren't.

Evolution is well supported by other schools of science, and so they get attacked as well. Geology helps support evolution by providing multiple means of dating the fossil record and it gets attacked by saying that it's all sediment from the Flood. Genetics provided the method for evolution to occur that Darwin's original theory lacked and we can show evolution occur through genetic shifts, but it is attacked nonetheless with a pathetic attempt made to show that all of the data in our genome has been there since the beginning.

The sad thing is that all of this argument by those of Faith trying to show that we are a special creation misses the fact that even if we were not created by a creator, we are still special. We are one of the few creatures in the world that has created a means of passing on learned knowledge. (Some of our mammalian relatives are doing this as well now, such as chimpanzees.)

It's just sad that we have a portion of society that is trying to prevent or pervert the knowledge that should be passed on.

April 8, 2009

WORKAROUND: Sitefinity 3.6 Search Can't Handle Redirects

Issue:

If you create a control that uses Response.Redirect(), Sitefinity's search engine crawler will not advance past that page. If you are using the Administrator console to force an index, when the crawler hits that page, it will redirect the page and abort further indexing.

Workaround:

Somewhere prior to the Response.Redirect(), abort out if Telerik.CmsContext.IsCrawlerRequest is true.

Notes:

This is a huge issue. Response.Redirect() is the most common tool used to move around a .NET application. It's bad enough that having a Response.Redirect() occur in any of your controls in design mode redirects you out of the page design surface, but having Response.Redirect() kill the crawler is unacceptable.

Update:

As you can see in the comments below, a fix for this is forthcoming.