GithubHelp home page GithubHelp logo

southpolesteve / turbolinks_test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from steveklabnik/turbolinks_test

0.0 2.0 0.0 879 KB

Seriously. Use numbers.

Home Page: http://blog.steveklabnik.com/posts/2012-09-27-seriously--numbers--use-them-

Ruby 95.32% CoffeeScript 1.20% JavaScript 3.48%

turbolinks_test's Introduction

Turbolinks test

Well, by now, you've done all your arguing on Twitter. Is Turbolinks a good idea, or the Worst Thing Ever?

optimizing a bit early

don knuth tony hoare

See these guys? One of them said this:

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil"

Wisdom.

But what makes optimization premature? When you don't know if you should do it or not. How do you know?

measure twice, cut once

measure twice

Measuring. It's good for you. You can do it. If you measure things, you can be sure what's up.

But like eating your veggies, nobody measures. Ever.

you're a scientist, dammit

Computer SCIENCE is called science for a reason, yo. Be a scientist. Don't just argue about stuff on blogs. Measure things. Then report back.

this test sucks

This probably isn't even a good test. I don't care. Tell me how it sucks. Let's figure it out. But having actual measurements beats complaining about shit on Twitter any day.

what's it do?

Well, it fires up Selenium, and clicks some links. 1000 of them, by default. Then it prints out how long that took.

Branches

I've added some commits to master since I originally forked the branches. If you try this, you may want to add some of them in.

To run it:

$ bundle
$ rake assets:precompile
$ TIMES=100 rspec

Done.

What I get:

With 1000 pages:

$ rspec
       user     system      total        real
 no turbolinks 11.170000   0.980000  12.460000 (138.656728)
yes turbolinks 10.800000   0.870000  11.670000 ( 80.436286)

With 100 pages:

$ rspec
       user     system      total        real
 no turbolinks  1.640000   0.190000   2.140000 ( 15.652763)
yes turbolinks  1.120000   0.090000   1.210000 (  7.776116)

turbolinks_test's People

Contributors

steveklabnik avatar ryanb avatar garybernhardt avatar

Watchers

Steve Faulkner avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.