Rails 5 recompiles templates on every request in test env. Fix will be released only in 5.0.2.
Add this lines to test helper to get the performance now (I've got x2 improvement):
class << ActionView::LookupContext::DetailsKey
def clear| let people = [ | |
| { name: 'Bob', age: 28, child: { name: 'Sally', age: 8, grade: 3 } }, | |
| { name: 'Sara', age: 46, child: { name: 'Lois', age: 14, grade: 9 } }, | |
| { name: 'Ann', age: 27, child: { name: 'George', age: 9, grade: 4 } }, | |
| { name: 'Dave', age: 52, child: { name: 'Hale', age: 17, grade: 11 } }, | |
| ]; | |
| const add1 = (x) => x + 1; | |
| const toFieldApplyFunc = (field, fn) => { | |
| return (obj) => { |
| /* | |
| * Copyright (C) 2017 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| files: | |
| "/opt/elasticbeanstalk/support/conf/sidekiq.conf": | |
| mode: "000755" | |
| content: | | |
| description "Elastic Beanstalk Sidekiq Upstart Manager" | |
| start on runlevel [2345] | |
| stop on runlevel [06] | |
| # explained above | |
| respawn | |
| respawn limit 2 30 |
| // @flow | |
| import type { | |
| StyleObj, | |
| } from 'react-native/Libraries/StyleSheet/StyleSheetTypes'; | |
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { Text, View, StyleSheet } from 'react-native'; | |
| import invariant from 'invariant'; |
| 'use strict'; | |
| var AWS = require('aws-sdk'); | |
| var s3 = new AWS.S3({ | |
| apiVersion: '2012-09-25' | |
| }); | |
| var eltr = new AWS.ElasticTranscoder({ | |
| apiVersion: '2012-09-25', | |
| region: 'us-east-1' | |
| }); |
| # Sidekiq interaction and startup script | |
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh": | |
| mode: "000755" | |
| content: | | |
| #!/bin/bash | |
| . /opt/elasticbeanstalk/hooks/common.sh | |
| . /opt/elasticbeanstalk/support/envvars |
| # Without this fix, downgrading from Rails 4 to Rails 3 causes session cookies to blow up. | |
| # | |
| # The way the flash is stored in the session changed in a backwards-incompatible way. | |
| if Rails::VERSION::MAJOR == 3 | |
| module ActionDispatch | |
| class Flash | |
| def call(env) | |
| if (session = env['rack.session']) && (flash = session['flash']) |
| #!/usr/bin/env bash | |
| if [ $# -eq 0 ]; then | |
| echo "please supply a servername: bootstrap-server.sh node.example.com" | |
| exit 1 | |
| fi | |
| username=`whoami` | |
| # copy public rsa key to server for root user | |
| read -r -p "Transfer ssh public keys to server for root? [y/N] " response | |
| if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]]; then |
| import rx.Observable; | |
| import rx.subjects.PublishSubject; | |
| import rx.subjects.SerializedSubject; | |
| import rx.subjects.Subject; | |
| /** | |
| * Simple pass-thru event bus with error handling and reconnect. | |
| */ | |
| public class EventBus { |