Overheads getting a member

A while ago I wrote a blogentry about different ways of obtaining the hostname. When I wrote that one I thought wonder how the different way of accessing the member values increases the cost. So this is a blogentry about that. There are different overheads depending on how you get your objects member. To illustrate this I have made a simple single WMI query and saved in a variable, from which we will now get the name of the computer.

First lets get the WMI object:

So now we have the wmi object in the variable $wmics. So how do we get the name. Well here there are a few ways all giving the same answer.

[Read more…]

Getting rid of gravatar from WordPress

Even though I had disabled Avatars completely under Settings => Discussions, my site was still loading javascrips and CSS from s.gravatar.com (secure.gravatar.com if you are using SSL). So what is up?

First of why care? Well since I have disabled avatars since I don’t need them, I don’t want my visitors to download unnecessary files. Just load your page and start your browsers developers tools (Chrome shortcut is Ctrl+Shift+I). There you should be able to see that your site is currently downloading lots of files, each file is a possible delay. I use GTMetrix sometimes just what they think of my site.

Well back to the what is happening. Without any need my site is instructing each visitor to download the following javascript and CSS files:

URL
http://s.gravatar.com/js/gprofiles.js?ver=2014Apraa
http://s.gravatar.com/css/hovercard.css?ver=2014Apraa
http://s.gravatar.com/css/services.css?ver=2014Apraa
[Read more…]