Follow Funny Falcon's guides to performance improvements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class CreatePizzas < ActiveRecord::Migration | |
| def change | |
| create_table :pizzas, :options => 'ENGINE=MyISAM' do |t| | |
| t.string :awesome | |
| t.timestamps | |
| end | |
| add_index :pizzas, :awesome, type: 'FULLTEXT' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| irb(main):027:0> s = AdDistribution.reflect_on_association(:publisher_points).klass.instance_exec(&AdDistribution.reflect_on_association(:publisher_points).scope) | |
| AdDistributionPoint Load (0.3ms) SELECT `ad_distribution_points`.* FROM `ad_distribution_points` WHERE (publisher_id IS NOT NULL) | |
| => #<ActiveRecord::Relation []> | |
| irb(main):028:0> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # asset_sync gem seems to be incompatible with Rails4. This is | |
| # a very bare-bones s3 asset sync script. | |
| # RAILS_ENV=development bundle exec rake assets:upload_to_s3 | |
| namespace :assets do | |
| task :upload_to_s3 => :environment do | |
| require 'aws-sdk' | |
| config = YAML.load(File.open(Rails.root.join("config", "s3.yml")))[Rails.env.to_s] | |
| AWS.config(config) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name":"parent_category", | |
| "id":10, | |
| "subcategories": [ | |
| { | |
| "name":"child_category", | |
| "id" 20 | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LM-BOS-00676322:campaign_manager kmazaika$ bundle exec rake | |
| Run options: --seed 3248 | |
| # Running tests: | |
| ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LM-BOS-00676322:campaign_manager kmazaika$ bundle exec rake | |
| Rack::File headers parameter replaces cache_control after Rack 1.5. | |
| Run options: | |
| # Running tests: | |
| ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LM-BOS-00676322:campaign_manager kmazaika$ bundle exec rake | |
| Run options: --seed 8221 | |
| # Running tests: | |
| ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LM-BOS-00676322:campaign_manager kmazaika$ bundle exec rake | |
| Run options: --seed 49686 | |
| # Running tests: | |
| ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export RUBY_HEAP_MIN_SLOTS=600000 | |
| export RUBY_GC_MALLOC_LIMIT=59000000 | |
| export RUBY_HEAP_FREE_MIN=100000 |