Collective Idea

Collective Idea Logo

Daniel Morrison

Slow it Down

By Daniel Morrison on January 18, 2012 in development, lion, mac, and tips

Most of the time, you test your apps on a fast connection, especially when working on a local machine. Most of your clients/visitors/customers aren’t so lucky, but how do you simulate their connection speed?

If you have installed Xcode on Lion, you have access to a very cool tool called Network Link Conditioner1.

It is a preference pane, but not installed by default. You’ll find it in /Developer/Applications/Utilities/Network Link Conditioner/ Simply double-click the prefPane and it will install itself.

Once enabled, you can set your network to simulate everything from 3G or Edge to typical DSL. You can even set your own profile to tweak the settings. It works at the network level, so it affects your entire system. No proxies or any other setup needed!

As an example, we have an app in development where we know the users will have high latency. Instead of just hoping they get better connections, we can simulate their situation and test it out, even when we’re using Rails on our laptops. We’re then using it to optimize to their situation, not just blindly2.

Give it a shot and see how your sites fare.

1 This may win the award for ugliest Apple icon. Please prove me wrong!

2 Don’t prematurely optimize. That’s still bad.

By Daniel Morrison on January 18, 2012 in development, lion, mac, and tips

2 Comments

  1. Manu

    Manu January 18, 2012 http://www.manu-j.com

    Changing the entire system’s connection is neither needed nor desirable IMO

    I wrote a shell script which uses ipfw for exactly this purpose (Most probably this app uses ipfw too) here is the script- https://gist.github.com/1409218

    Run it like

       throttle -p 3000 -d 1000ms -s 256Kbit/s start

    p – Port
    d – network delay you want
    s – speed

  2. Daniel Morrison

    Daniel Morrison January 18, 2012 http://collectiveidea.com

    Manu: That’s a great tactic too, and I like how it only throttles one port.

    The nice thing about the PrefPane is that it is visible (icon goes in your menubar when on) so you don’t forget it is running, and easier to configure/use for people who don’t live in the terminal.

Post a Comment

Contact Us

Find us on Google Maps
Collective Idea
25 West 8th Street, Suite 200
Holland, Michigan 49423 USA 42.790299-86.108415

Follow us on the Interwebs

We are currently available for medium and long term projects. Please get in touch if we can be of service.