168.967965859 + 180.168413372 + 204.073469793 + 202.330561802 + 213.464530603
969.004941429 Seconds / 16.1501 minutes
197.845757202 + 195.413866426 + 235.140259255 + 206.174857892 + 231.315514325
1065.8902551 Seconds / 17.7648 minutes
require 'delegate' | |
class CarDecorator < SimpleDelegator | |
def self.decorate(objects) | |
objects.map { |object| new(object) } | |
end | |
def car | |
__getobj__ | |
end |
I noticed the boot time for the application was very slow. Here are the actions and steps I took to decrease it.
The first think I needed to do was benchmark how long each bit of code took to be required by the application. I used a script I found on Google to help.
Combining and adding all the require times together you can see that it take almost a minute to load everything.
$ ruby AddTimes_0.rb
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Map Function keys to match Apple</name> | |
<identifier>private.itunes_fkeys</identifier> | |
<autogen>__KeyToConsumer__ KeyCode::F1, ConsumerKeyCode::BRIGHTNESS_DOWN</autogen> | |
<autogen>__KeyToConsumer__ KeyCode::F2, ConsumerKeyCode::BRIGHTNESS_UP</autogen> | |
<autogen>__KeyToKey__ KeyCode::F3, KeyCode::EXPOSE_ALL</autogen> | |
<autogen>__KeyToKey__ KeyCode::F4, KeyCode::LAUNCHPAD</autogen> | |
<autogen>__KeyToConsumer__ KeyCode::F5, ConsumerKeyCode::KEYBOARDLIGHT_LOW</autogen> |
I hereby claim:
To claim this, I am signing this object:
£225.00
£420.88
def view_css | |
path = "views/#{params[:controller]}/#{params[:action]}" | |
stylesheet_link_tag(path) unless Rails.application.assets.find_asset(path).nil? | |
end |
<!doctype html> | |
<head> | |
<!-- CnC Widget Base Styles Include --> | |
<link href='https://bucket.s3.amazonaws.com/cf23df2207d99a74fbe169e3eba035e633b65d94.min.css' rel='stylesheet' type='text/css'> | |
</head> | |
<body> | |
<!-- CnC Widget Base Element --> | |
<div id="click-and-collect-reservation-widget" | |
data-client="cf23df2207d99a74fbe169e3eba035e633b65d94" |
This list is based on aliases_spec.rb.
You can see also Module: RSpec::Matchers API.
matcher | aliased to | description |
---|---|---|
a_truthy_value | be_truthy | a truthy value |
a_falsey_value | be_falsey | a falsey value |
be_falsy | be_falsey | be falsy |
a_falsy_value | be_falsey | a falsy value |