DotNetNuke Performance Tips

Every website run’s into the ghost of a machine. Latency issues? Long responses for client requests? All ghosts, in which can make managing a DotNetNuke instance very painful. But what can we do?

Lets try and solve a couple of these problems!

Database Size:

As you can guess, the size of your database is very important. Lets clean it up a tad.

First take a look at your “EventLog” table. As you can probably guess from the name, it stores events that happen such as when a user log’s in, when someone tries to login, and just general errors that occur. Yes this is important, but honestly… it is only important in the beginning and the end of your applications life. During the middle of the applications life cycle, I suggest turning it off. Make sure you delete the irritating records left in the DB as well.

To Turn off the Event Log, go to your DNN Host Settings page, and ensure the “Site Log History” setting is set to 0(zero).

A couple other tables to clean out would be “SiteLog” and “Scheduler log”.. These records are also just wasting space on the disk.

Database Scripts:

As well, DNN has plenty of washed-up crappy scripts in it’s possession. You can fix a lot of this by using DNNScripts off of codeplex.

The Application:

First thing to keeping a clean application, is when hosted with IIS. Make sure you application stays alive! If no one visits you website once every twenty minutes, IIS by default shuts it down, therefore causing the first user after those 20 minutes endure a painstakingly slow initial page load time. You can prevent this by using Pingdom or PingAlive . However, if you have access to the server, I suggest you change the Idle Time-out settings.

Afraid that the pinging will mess with your site statistics? Try creating a sub site, on the same application and then having the service ping it instead. That way you can go about your business as usual.

Here is another good resource on ensuring your application is alive at all times. I haven’t actually tried it though.. as it is not specific for DNN. : CodeProject – Keep Your Website Alive

Does you site have a lot of static information? Cache it! You can do this via changing the performance settings to heavy caching.

Module Optimization:

Make sure you use SQL Profiler to find long running scripts, usually from 3rd party modules. Then report those issues to their developers. I like to think, no script should surpass 500ms on the norm.

Remove unused modules from your server. If you aren’t using them, then neither should DNN. Get rid of them!

Your Skin:

Install YSlow and make sure you get an A for performance! You can usually find errors in how things are GZIPed and maybe combine your CSS and JS files to get better performance.


 

Hopefully one or a few of these methods described will help you with your site. If you have any other tips or comments about how to improve DNN’s performance, feel free to let me know with a comment below.

 

TOTD: Count the Rows displayed in a Table With Javascript/jQuery

I use to do a lot of simple things using JavaScript to manipulate webpages that were not mine. Whether it be to make the font size bigger, or theme a site to my preference, it never dawned on me that I would need it in the real world.

Here is a simple JavaScript function that anyone could of written. I use it to count the rows in a table when I am working with data on webpages. It is usually better as a bookmark.

Enjoy!

Node.js – Manage Connected Users

Frustration has fallen upon me during development with Node.js and Socket.io. I’ve been working on a simple card game for the past month or two and keep running into an issue with the Socket.io library. That issue is the complexity of user/client management. Therefore I am currently working on a “Proof Of Concept” to help me work out the kinks for Socket.io and user management. If you’d like to join me or just view my progress feel free to check out the repository as follows.

Node Client Manager

P.S. Suggestions are welcomed.

TOTD SQL Join Statements

Personal Notes:

INNER JOIN — Join columns, however remove records with null values.

LEFT/RIGHT JOIN — Join columns, and leave all columns there.

FULL JOIN — Join columns, even if there is only one match between tables.

Dawn Of A New Laptop (Updated: 11/29/2014)

It’s 2014 going on 2015 and yes, I know Windows 10 is near… However, this is the last time I am putting up with my unreliable Samsung Series 9. It seems every 6 to 8 months it decides to go corrupt and have me be forced to replace the SSD. NOT COOL! Don’t get me wrong… I loved it. I don’t hate Samsung. I just had a fluke. It was a model that they didn’t test property, and upon that it was basically rare hardware at the time. You could say I was the consumer beta test if you sole wanted.

Microsoft Clippy

Either way, I am beginning the investigation of a new laptop and plan on documenting the requirements for this laptop in this blog post. If you are a developer or just feel like I have missed something on this list, feel free to comment below letting me know! I am thinking about Lenovo and Asus, althought haven’t put my fist down on them yet.

Also just a note to everyone, the items are not in any particular order.

Last Updated: 10/15/2014 2:54pm

  • 8+ GB of RAM
  • 7+ hours of battery on a single charge.
  • Must be able to virtualize.
  • 256GB minimum SSD that works..
  • 1080p screen, touch would be preferred.
  • Would love a 2 in 1, but don’t mind it being just a laptop.
  • Thin and light weight.
  • No bigger than a 15.4 inch screen… minimum is 13.3(if even that…)
  • Two 3.0 USB ports.
  • Mini or full HDMI port.
  • Bluetooth 4.0 L.E.
  • Wireless b/g/n
  • Strong body design… built for business.
  • etc.

Laptops that I am going to consider:

( Updated 11/18/2014 )

Lenovo Yoga 2 Pro

Lenovo Yoga 2 Pro Orange

Lenovo Yoga 3 Pro

Asus Zenbook UX303

Acer Aspire S7

Acer Aspire V7

Asus N550JK

Dell Inspiron 13 7000 Series

HP ENVY 14t Laptop (Customized to the 849.99* Price)

HP ENVY x360 15 Touch Laptop

Lenovo IdeaPad G50

Lenovo Y50 Gaming Laptop

Asus VivoBook Referb

Update(11/26/2014):

I plan on starting to assess the laptops in person tomorrow. Hopefully I can find some of them at my local stores.

Update(11/29/2014):

Went to Best Buy the other day to see what the Yoga’s looked like and felt like. Seemed that they have pretty strong hinges for the convertibles, whereas they are made of a rubbery plastic. The screens were beautiful, yet they only had 13.3 inch models on display and in stock. I am feeling like the 13.3 inch is a bit small, and am feeling I would probably fit better with a 14 inch.

Bad Pratice With Web Site Registration Emails

To vent a little bit about security, I come to you now. DO NOT send passwords in emails.

Emails are either plain text or HTML/CSS. Even with an encrypted path to the receiving person, it can still be tampered with. Also as a website owner you should never be able to look in your database and see anyone’s password anyways(hash that, salt that)… So why would you send it to them in an email, specifically when they register?

It is a fact that this is bad practice. Therefore any websites created as of 10/10/2014 and later.. heck like 10/10/2008 and later, I will not be using if such logic is overlooked.

Thank you for your time.

Fixing NPM “Error: ENOENT” Issue

Step 1) Copy the path up to, but not including the npm folder next to the error. Mine was the path below.

Step 2) Open up Windows Explorer and paste the location into the address field.

Step 3) Create a new folder called ‘npm’ without the quotation marks. Then try the npm command again in the Terminal/PowerShell.

All should work as planned now. Enjoy!

Node.JS Function Callback Scope (i.e. Passing A Function)

687474703a2f2f737562737461636b2e6e65742f696d616765732f6e6f64655f747572746c652e706e67.resizedToday while going through exercise 6 of learnyounode’s tutorials I got very frustrated. This tumblr link doesn’t even do me justice. Yet after about an hour of smashing my head against my keyboard I decided to go back to the basics.

When passing functions in Node.js you must remember the current scope of variables. I ended up passing a callback function to a function within a custom module I was making for the exercise, and ended up resetting the variable to “undefined” in the process. Below is the code that caused me the issue:

Looking above the code seems file at first glance, however take a closer look at that single nested function within getList. It has a reference to call which is linked to the higher level callback function. Apparently Node.js throws a fit with this saying it is undefined.

That being said I wasn’t paying attention to the scope of the code. All I really needed to do was call the callback function from with in the nested function. Because it is embedded in the original function it has scope access to all the variables defined before it’s initialization. So I present to you the working code:

Hopefully one day this will be able to help either myself or someone else out there on the internet.