MBC Computer Solutions Ltd.

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 3 February 2012

An Experiment with Google Services & Page Speed

Posted on 08:40 by Unknown

When building eCommerce sites, we deal a lot with performance.  Not just ensuring that our sites respond quickly, but also working with customers to explain what makes up the overall performance characteristics of a site, and what might be impacting theirs.  Unfortunately, performance tends to be misunderstood among both technical and non-technical persons.  Frequently we receive reports about “slow sites” with customers assuming the problem lies within our services and obviously looking for a solution.  In most cases, the slow-downs on the sites actually tend to come from external factors like 3rd party scripts, yet it seems like every service out there wants you to drop one of their tracking scripts on your page.

There are now a number of tools on the market which aim to give a single score metric indicating the performance of your site, the most commonly used one seems to be Google Page Speed. 

I decided to run a little experiment to see how adding Google services to a page affected both performance and Page Speed scores.

First, my setup:

  • Firefox 10.0 with Firebug 1.8.4
  • Files hosted at same datacenter facility as our eCommerce sites (not locally)
  • 100mbit internet connection at testing location
  • CPU is a Xeon X5550, 18GB RAM, 2x SAS 15K drives in RAID-0 (workstation performance definitely isn’t going to be the bottleneck here!)

To start, I created a plain-old XHTML 1.0 Transitional page with 10 paragraphs of Lorem Ipsum text. I then added Google Services to the page one at a time, starting with Google Analytics (the most commonly included script I could think of).  For each page, I reloaded it with CTRL-F5 in order to ensure I did not use any cached resources.  GZIP was disabled on the server hosting the HTML pages to ensure the compression times did not affect time-to-first-byte (TTFB).

The pages I tested with can be found at the following links:

  • Test 1: Plain-old HTML: http://www.berkovitz.org/googlepagespeedexperiment_1.html
  • Test 2: Added Google Analytics: http://www.berkovitz.org/googlepagespeedexperiment_2.html
  • Test 3: Added AdWords Conversion Tracking: http://www.berkovitz.org/googlepagespeedexperiment_3.html
  • Test 4: Added Google Plus Button: http://www.berkovitz.org/googlepagespeedexperiment_4.html
  • Test 5: Added Google Maps IFRAME: http://www.berkovitz.org/googlepagespeedexperiment_5.html

The results are interesting to say the least:

Test Description On-Load Time (ms) Size (KB) # Requests Page Speed Score
1 Plain-old HTML 82 7.2 1 92
2 Added Google Analytics 287 20.8 3 93
3 Added AdWords Conversion Tracking 366 23.7 6 92
4 Added Google Plus button 830 126.2 12 94
5 Added embedded Google Maps 6130 414.9 35 94

The most interesting part was that the more services I added and the slower the site performed, the better the Page Speed score got!  In fact, the end result was a page with a load time 75x slower than the original, 57x larger and with 35x the number of requests yet the Page Speed Score increased by 2 over the original.

It just goes to show that you cannot base your analysis of a site solely on a single tool.  Your site might have a Page Speed score of 94, but an on-load time of 6.1sec is obviously going to be perceived as very slow to users.   And don’t even get me started about Google Webmaster Tools!

Read More
Posted in | No comments

Friday, 23 April 2010

ScottGu’s Color Scheme for Visual Studio 2010

Posted on 14:46 by Unknown

ScottGu was nice enough to provide the world with his awesome Visual Studio 2008 color scheme.  I’ve been using this for many years now and I highly recommend it – after years of working on a dark background, I find a white coding background to be harsh and straining.

Visual Studio 2010 introduces some new syntax coloring options, and when importing a VS2008 settings file, will resort to defaults for these values.  The result is a pretty ugly editor when used with this color scheme.

Lucky for you, I’ve taken the time to update the file.  Download the VS2010 ScottGu Color Scheme.

Read More
Posted in | No comments

Monday, 7 December 2009

Moving the C:\WINDOWS\INSTALLER Directory

Posted on 09:42 by Unknown

Often servers or workstations will run low of disk space on the system partition.  This is especially true I’ve found with older Dell servers that shipped with a 12GB system partition.

The c:\windows\installer directory often occupies several gigabytes of storage.

While Windows does not provide a mechanism to re-point this directory via the registry, you can use NTFS junctions/reparse points to re-point the directory to a different local volume.  Re-pointing to UNC paths is not supported.

  1. Obtain junction.exe from http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx

    I found it handy to add the executable to c:\windows\system32 for easy access

  2. Create the destination Installer folder on the new volume (ie: D:\Installer)

  3. Move all content from c:\windows\installer to your new directory

  4. Make sure to close any explorer windows with these folders opened.  Junction.exe requires that there are no open file handles to these directories

  5. Create the junction

    junction.exe c:\windows\installer d:\installer
Read More
Posted in | No comments

Monday, 30 November 2009

Blackberry Enterprise Server - “The personal redirection folders are unavailable”

Posted on 14:35 by Unknown

After upgrading our corporate Blackberry Enterprise Server (BES) from 5.0 to 5.0SP1, all of our users started complaining that most if not all of their contacts were now missing.

From the Web Desktop Manager, and choosing the “Redirection Folders” section (where you configure which folders are redirected), the following error message was displayed at the top.

The personal redirection folders are unavailable. Contact your system administrator.

Great, they want me to contact myself.  Typical.

The Desktop Manager did not show any errors but also would not allow me to select any folders or my default private contact folder.

A glance through some of the BES logs showed messages like:

javax.ejb.EJBTransactionRolledbackException: org.hibernate.exception.SQLGrammarException: could not insert: [com.rim.bes.basplugin.synchronization.entity.SyncFolderListEntity]

[org.hibernate.util.JDBCExceptionReporter] [ERROR] Cannot insert duplicate key row in object 'dbo.SyncFolderList' with unique index 'IX_SyncFolderList_GUIDLoc'.

I happen to be a DBA, so I decided to dig right in.

First and foremost, before you perform any type of manual database manipulation against your BESMgmt database, TAKE A FULL BACKUP.  Did I mention you should take a FULL BACKUP?   Did you take a FULL backup? Ok good.  Also, if you are not familiar with SQL or simply don’t want to risk  bringing down your environment, I recommend you contact RIM support.

There are two database tables that control the bulk of this.  [dbo].[SyncFolderUserList] and [dbo].[SyncFolderList].  The [dbo].[UserConfig] table also contains all of the users, and you will need to reference it for this operation.

First, I looked up my user id from the UserConfig table.
SELECT *  FROM [dbo].[UserConfig]. 
I’m ID 47.

I then looked up my folder list from the SyncFolderUserList table.

SELECT * FROM [dbo].[SyncFolderUserList]
WHERE [UserConfigId] = 47

This yielded two records for me.  Note the data in the SyncFolderListId table.  For my scenario, I had two records, one with ID 60 and the other 147.

I then queried the SyncFolderList table for those rows.

SELECT *  FROM [dbo].[SyncFolderList]
WHERE [Id] IN (60, 147)

While I was expecting two entries, to my surprise there was only one entry.   Bingo, a rogue entry!

Seeing how it was only two folders, rather than deleting the rogue one and seeing if it worked, I opted to delete all of my data from both the SyncFolderList and the SyncFolderUserList tables. 

To my expectation, I was now able to select the folders again from either Web Desktop Manager or the Desktop Manager.

As a number of other users in our environment were experiencing the same issue, I decided to delete these tables all together.  All users reported they were now able to select folders to sync, and upon selecting them, their devices properly synchronized.

Drop a comment if this helped you!

Read More
Posted in | No comments

Friday, 9 October 2009

What’s in your BBIM Barcode?

Posted on 19:30 by Unknown

New with Blackberry Instant Messenger (BBIM) 5.0 is the ability to add contacts by scanning a barcode which BBIM can emit through the “my profile” feature.

It’s a cool feature, but I was obviously curious what was being sent.

The barcode is a QR Barcode, a two dimension barcode and ISO standard.  You can read all about them online.

Using the Barcode Reader for .NET library, I scanned mine in.  Here’s what I found

bbm:x07x8cce7b313673Steven Berkovitz

First, we’ve got a BBIM  identifier, “bbm”.

Followed by my PIN,”x07x8cce” (I’ve replaced a few characters).

The third set, “7b313673” I have not yet identified but it does differ between barcodes.  I’ll update this post when I find out.

At the end is my display name (not your name, I’ve verified this with some other barcodes), “Steven Berkovitz”

Read More
Posted in | No comments

Monday, 13 July 2009

C# – Converting IP’s to Numbers and Numbers to IP’s in 2 lines of code

Posted on 11:17 by Unknown

I don’t know why everywhere I searched had such complex implementation of this, but converting from a dotted IP to a number (integer) and back is quite straight forward with the help of the IPAddress and BitConverter classes.

Also, keep in mind that IP addresses are 32 bit integers; I’m not sure why people feel it’s necessary to use a decimal or double for this when a uint will work just fine!

/// 
/// Converts the IP address to an integer.
///

/// The IP address in dotted form.
///
public static uint ConvertIpToInteger(string ipAddress) {
return BitConverter.ToUInt32(IPAddress.Parse(ipAddress).GetAddressBytes().Reverse().ToArray(), 0);
}

///
/// Converts the integer to an IP address.
///

/// The IP address in integer form.
///
public static string ConvertIntegerToIp(uint ipAddress) {
return new IPAddress(BitConverter.GetBytes(ipAddress).Reverse().ToArray()).ToString();
}
Read More
Posted in | No comments

Thursday, 23 April 2009

Using SQL PIVOT with non-aggregate column

Posted on 12:35 by Unknown

I was banging my head on my desk for a while over this one, hopefully this will save you the pain…

I wanted to use SQL 2005’s PIVOT function except the data I was trying to PIVOT was a text column, not an aggregate of a column.  However, the business rule for this table was a 1:1 rule so there’d never be anything to aggregate anyways (even when the data is numeric).

What got me at first was the “Incorrect syntax near the keyword 'FOR'.” error message which didn’t make a whole lot of sense until I realized that added a SUM(1) resolved the problem (hence, the requirement for an aggregate column).

So how, might you ask, do you work around this?  Well, you don’t – the PIVOT function only takes an aggregate value after all.  That being said, our friend MAX and MIN don’t require a numeric value to be passed to them – they are perfectly happy accepting a varchar or nvarchar value.

So instead of trying

PIVOT([MyTextColumn] FOR [MyHeader] IN ([List],[Of],[Columns]))

Use

PIVOT(MAX([MyTextColumn]) FOR [MyHeader] IN ([List],[Of],[Columns]))

Read More
Posted in | No comments
Older Posts Home
Subscribe to: Comments (Atom)

Popular Posts

  • How to change the temperature scale on a Honeywell T6575 Thermostat
    [The complete documentation can be found at http://customer.honeywell.ca/techlit/pdf/95c-00000s/95c-10897.pdf ]   This was bugging me fo...
  • C# – Converting IP’s to Numbers and Numbers to IP’s in 2 lines of code
    I don’t know why everywhere I searched had such complex implementation of this, but converting from a dotted IP to a number (integer) and ba...
  • Why does iTunes setup need to close Outlook?!
    Everytime I update iTunes I remember why I left it so long - the install process is quite annoying! Can someone please explain to me why it...
  • Mac OSX 10.5.2 Freezing Intermittently
    I've been having an issue with my MacBook (you know, that computer I hide under my desk most of the time) where intermittently, the UI w...
  • ScottGu’s Color Scheme for Visual Studio 2010
    ScottGu was nice enough to provide the world with his awesome Visual Studio 2008 color scheme.  I’ve been using this for many years now an...
  • Windows Search 4.0 Released .....and searching finally works!
    I've been dealing with Outlook 2007's search problems since installing it way back then.  Most frequently, I'd search a keyword;...
  • Don’t forget about the defer attribute for non-essential external scripts
    I was recently reviewing a customers eCommerce site and I noticed that the “Please Wait” page that occurs after completing an order but befo...
  • Recursively finding controls - where to start?
    I love hearing about bugs and problems in components I have authored.  Most people hate hearing about bugs (I assume because they like to th...
  • Popup Window Manager
    I was just reading a post by Rick Strahl about managing popup windows in the browser.  I actually authored a mini popup window manager a wh...
  • New Blackberry firmware coming down the pipe?
    My partner alerted me today to the fact that RIM has finally released 4.2 code for the 8700. I complained a while back that the 8800 code ...

Blog Archive

  • ▼  2012 (1)
    • ▼  February (1)
      • An Experiment with Google Services & Page Speed
  • ►  2010 (1)
    • ►  April (1)
  • ►  2009 (7)
    • ►  December (1)
    • ►  November (1)
    • ►  October (1)
    • ►  July (1)
    • ►  April (2)
    • ►  February (1)
  • ►  2008 (36)
    • ►  November (3)
    • ►  October (2)
    • ►  September (1)
    • ►  August (1)
    • ►  July (2)
    • ►  June (6)
    • ►  May (4)
    • ►  April (1)
    • ►  March (4)
    • ►  February (7)
    • ►  January (5)
  • ►  2007 (35)
    • ►  December (1)
    • ►  November (9)
    • ►  October (3)
    • ►  September (6)
    • ►  August (7)
    • ►  July (9)
  • ►  2006 (3)
    • ►  May (3)
Powered by Blogger.

About Me

Unknown
View my complete profile