This project is archived and is in readonly mode.

#5538 ✓stale
James Harton

Bad memory leak in Arel 1.0.1?

Reported by James Harton | September 3rd, 2010 @ 12:25 AM

I have code that has happily been running on Rails 3.0.0.rc2 and previous betas without any issues that executes a query that should look like this:

SELECT posts.id FROM posts INNER JOIN mentions ON mentions.post_id = posts.id WHERE mentions.cluster_id = 4 AND posts.type != 'Notice'

Not a particularly hardcore query, my Ruby looks like this:

    pt = Post.arel_table
    mt = Mention.arel_table
    mention_posts = mt.join(pt).on(mt[:post_id].eq(pt[:id])).where(mt[:cluster_id].eq(4)).where(pt[:type].eq('Notice').not).project(pt[:id])

When that last line is executed my Ruby process grows until it exceeds the available RAM on my machine or I kill it manually.

If I run that code from the command line and monitor it with:

ps auxww | head -1 ; for I in `jot - 1 60`; do ps auxww | grep "rai[l]s c"; sleep 1; done ; killall -KILL ruby

I get the following:

USER       PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
jnh      41468   0.3  2.5   137380  52792 s000  S+   11:19AM   0:16.11 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   1.9  2.6   137512  53604 s000  R+   11:19AM   0:16.15 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  91.5  3.5   162252  74092 s000  R+   11:19AM   0:17.19 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.6  4.3   185684  89472 s000  R+   11:19AM   0:18.22 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468 100.1  4.7   204100  99372 s000  R+   11:19AM   0:19.25 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  99.2  4.8   197604 101108 s000  R+   11:19AM   0:20.32 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  90.8  5.3   201464 111780 s000  R+   11:19AM   0:21.34 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.1  5.7   236452 119932 s000  R+   11:19AM   0:22.39 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.3  7.2   288468 150940 s000  R+   11:19AM   0:23.44 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  97.0  6.6   216636 138492 s000  R+   11:19AM   0:24.43 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.1  6.9   227524 143904 s000  R+   11:19AM   0:25.46 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.9  7.1   231860 149180 s000  R+   11:19AM   0:26.50 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  96.2  7.6   250680 158564 s000  R+   11:19AM   0:27.54 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468 100.1  8.1   256340 170068 s000  R+   11:19AM   0:28.59 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  99.2  8.3   286724 173976 s000  R+   11:19AM   0:29.64 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  99.2 12.4   390196 260628 s000  R+   11:19AM   0:30.68 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.5 11.2   358484 235368 s000  R+   11:19AM   0:31.70 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  96.2 11.5   374532 241836 s000  R+   11:19AM   0:32.72 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.8 11.9   382220 250156 s000  R+   11:19AM   0:33.75 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.2 12.3   398260 258012 s000  R+   11:19AM   0:34.78 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  99.7 12.7   397444 265776 s000  R+   11:19AM   0:35.84 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  97.7 13.1   432388 275076 s000  R+   11:19AM   0:36.87 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.3 13.3   430420 278700 s000  R+   11:19AM   0:37.87 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.1 16.1   608356 338672 s000  R+   11:19AM   0:38.87 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  91.7 35.1  1053496 735192 s000  R+   11:19AM   0:40.22 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  97.6 11.7   402700 245240 s000  R+   11:19AM   0:41.23 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  99.3 12.0   408916 251552 s000  R+   11:19AM   0:42.26 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468 100.2 12.3   424140 257756 s000  R+   11:19AM   0:43.28 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  96.2 12.8   429256 268156 s000  R+   11:19AM   0:44.31 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468 100.2 13.2   463224 276084 s000  R+   11:19AM   0:45.35 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.9 13.5   459492 282476 s000  R+   11:19AM   0:46.41 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  90.6 15.9   492452 333292 s000  R+   11:19AM   0:47.39 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  94.2 14.0   451716 293232 s000  R+   11:19AM   0:48.74 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  66.9 14.5   472184 303556 s000  R+   11:19AM   0:50.20 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  86.7 14.9   477572 312220 s000  R+   11:19AM   0:51.19 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  77.2 15.2   474040 318428 s000  R+   11:19AM   0:52.11 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  91.5 15.5   509652 324636 s000  R+   11:19AM   0:52.94 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  95.2 16.0   507172 335268 s000  R+   11:19AM   0:53.94 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  99.1 18.7   588180 391588 s000  R+   11:19AM   0:55.22 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.0 18.9   598980 396028 s000  R+   11:19AM   0:56.25 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  70.0 19.0   606044 397752 s000  R+   11:19AM   0:57.15 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  94.8 19.2   620360 403112 s000  R+   11:19AM   0:58.12 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.8 19.7   624980 413832 s000  R+   11:19AM   0:59.16 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  97.5 19.9   654244 418364 s000  R+   11:19AM   1:00.20 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  98.3 20.4   654140 426864 s000  R+   11:19AM   1:01.25 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  99.5 23.0   688484 483036 s000  R+   11:19AM   1:02.29 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  17.6 39.2  1351268 822192 s000  R+   11:19AM   1:03.41 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   3.0 39.6  1351268 829632 s000  S+   11:19AM   1:03.44 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   3.6 39.9  1351268 837156 s000  R+   11:19AM   1:03.48 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   1.5 40.0  1351268 839540 s000  R+   11:19AM   1:03.49 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   1.8 40.4  1351268 846612 s000  R+   11:19AM   1:03.52 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   0.3 40.4  1351268 847280 s000  S+   11:19AM   1:03.53 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   0.4 40.4  1351268 847280 s000  S+   11:19AM   1:03.53 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   1.8 40.5  1351268 849968 s000  S+   11:19AM   1:03.55 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   3.9 41.0  1351268 860372 s000  R+   11:19AM   1:03.59 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   3.4 42.3  1351268 886092 s000  R+   11:19AM   1:03.68 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  10.0 44.2  1351268 925920 s000  S+   11:19AM   1:03.81 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468  56.4 43.5  1554404 912484 s000  R+   11:19AM   1:04.07 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   7.5 46.1  1554404 967424 s000  S+   11:19AM   1:04.22 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c
jnh      41468   5.7 47.3  1554404 991440 s000  R+   11:19AM   1:04.30 /Users/    jnh/.rvm/rubies/ruby-1.9.2-p0/bin/ruby script/rails c

As you can see that the Ruby process has grown to over 1GB of resident ram and an additional 1GB in swap.

Unfortunately I don't have the profiling skills to diagnose this much further, but I would really love to help.

Comments and changes to this ticket

  • James Harton

    James Harton September 3rd, 2010 @ 02:22 AM

    FYI, this happens just the same in Ruby 1.8.7 as well as 1.9.2, it just takes longer to fill up all the RAM.

  • James Harton

    James Harton September 3rd, 2010 @ 03:28 AM

    Oh, and I tried to run memprof over it but it doesn't work on my 32bit MacBook Pro.

  • James Harton

    James Harton September 3rd, 2010 @ 05:19 AM

    Using a minimum viable testcase (http://gist.github.com/563393) I have the following profile information:

      %   cumulative   self              self     total
     time   seconds   seconds    calls  ms/call  ms/call  name
     37.63     1.81      1.81      556     3.26     7.21  Array#map
     16.01     2.58      0.77    65481     0.01     0.01  Symbol#to_s
      9.36     3.03      0.45      159     2.83    18.05  Kernel.require
      7.69     3.40      0.37      187     1.98    16.52  Module#class_eval
      4.78     3.63      0.23     1517     0.15     7.93  Array#each
      4.37     3.84      0.21    17933     0.01     0.01  Hash#default
      2.49     3.96      0.12      330     0.36     0.48  ActiveSupport::Inflector.constantize
      1.25     4.02      0.06        2    30.00  2245.00  Kernel.load
      1.04     4.07      0.05      322     0.16     0.16  Module#constants
      1.04     4.12      0.05       90     0.56     1.33  Array#include?
      0.83     4.16      0.04      165     0.24     0.24  Array#-
      0.83     4.20      0.04     2639     0.02     0.02  String#==
      0.83     4.24      0.04       64     0.62     3.44  Module#module_eval
      0.83     4.28      0.04      161     0.25    64.84  ActiveSupport::Dependencies.new_constants_in
      0.62     4.31      0.03      731     0.04     0.04  Symbol#==
      0.62     4.34      0.03      670     0.04     0.04  String#split
      0.62     4.37      0.03        8     3.75     3.75  Module#parent_name
      0.62     4.40      0.03      326     0.09     0.15  Object#presence
      0.42     4.42      0.02      159     0.13    37.42  ActiveSupport::Dependencies::Loadable.load_dependency
      0.42     4.44      0.02      165     0.12     0.36  ActiveSupport::Dependencies.to_constant_name
      0.42     4.46      0.02      577     0.03     0.03  Array#concat
      0.42     4.48      0.02      560     0.04     0.04  Module#===
      0.42     4.50      0.02      326     0.06     0.06  Object#present?
      0.42     4.52      0.02      161     0.12     0.12  ActiveSupport::Dependencies.load?
      0.42     4.54      0.02      161     0.12     9.01  ActiveSupport::Dependencies::WatchStack#watch_namespaces
      0.21     4.55      0.01       10     1.00     1.00  ActiveRecord::ConnectionAdapters::Column#simplified_type
      0.21     4.56      0.01      531     0.02     0.02  Array#last
      0.21     4.57      0.01       75     0.13     0.13  Class#inherited_with_inheritable_attributes
      0.21     4.58      0.01        1    10.00    10.00  Module#alias_method_chain
      0.21     4.59      0.01        5     2.00     2.00  ActiveSupport::Notifications.notifier
      0.21     4.60      0.01       40     0.25     0.25  NilClass#method_missing
      0.21     4.61      0.01      109     0.09     0.09  Module#to_s
      0.21     4.62      0.01      973     0.01     0.01  Module#method_added
      0.21     4.63      0.01      326     0.03     0.31  ActiveSupport::Dependencies.qualified_const_defined?
      0.21     4.64      0.01      334     0.03     0.03  ActiveSupport::Dependencies.local_const_defined?
      0.21     4.65      0.01       62     0.16     0.16  Module#extend_object
      0.21     4.66      0.01       73     0.14     0.14  Kernel.instance_variable_defined?
      0.21     4.67      0.01       30     0.33     0.33  Fixnum#to_s
      0.21     4.68      0.01        6     1.67    20.00  ActiveRecord::Base#connection
      0.21     4.69      0.01        4     2.50    30.00  Kernel.loop
      0.21     4.70      0.01      332     0.03     0.03  String#empty?
      0.21     4.71      0.01      138     0.07     2.25  Class#new
      0.21     4.72      0.01        1    10.00   110.00  ActiveSupport::Notifications.instrumenter
      0.21     4.73      0.01      657     0.02     0.02  Hash#[]
      0.21     4.74      0.01      322     0.03     7.80  Module#local_constant_names
      0.21     4.75      0.01        2     5.00  2285.00  ActiveSupport::Dependencies::ModuleConstMissing.const_missing
      0.21     4.76      0.01      322     0.03     0.19  Module#local_constants
      0.21     4.77      0.01        1    10.00    10.00  Arel::Project#initialize
      0.21     4.78      0.01      165     0.06     0.06  ActiveSupport::Dependencies.log
      0.21     4.79      0.01      177     0.06     0.06  Symbol#to_sym
      0.21     4.80      0.01        3     3.33     6.67  ActiveRecord::Base#respond_to?
      0.21     4.81      0.01      160     0.06     0.06  IO#set_encoding
      0.00     4.81      0.00        4     0.00  2290.00  ActiveSupport::Dependencies.load_missing_constant
      0.00     4.81      0.00        1     0.00    10.00  ActiveRecord::ConnectionAdapters::SQLiteAdapter#tables
      0.00     4.81      0.00        6     0.00     0.00  Enumerable.any?
      0.00     4.81      0.00        6     0.00     0.00  ActiveSupport::Dependencies.loaded
      0.00     4.81      0.00       16     0.00     0.00  File#expand_path
      0.00     4.81      0.00        4     0.00     0.00  Hash#include?
      0.00     4.81      0.00        4     0.00     0.00  Set#include?
      0.00     4.81      0.00      208     0.00     0.00  Hash#[]=
      0.00     4.81      0.00       18     0.00     0.00  Set#add
      0.00     4.81      0.00      161     0.00     0.00  ActiveSupport::Dependencies.mechanism
      0.00     4.81      0.00        4     0.00     7.50  Module#parent
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Dependencies.autoload_module!
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Dependencies.autoloadable_module?
      0.00     4.81      0.00       38     0.00     0.00  NilClass#nil?
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Dependencies.warnings_on_first_load
      0.00     4.81      0.00        8     0.00     0.00  Regexp#=~
      0.00     4.81      0.00        7     0.00     0.00  String#[]
      0.00     4.81      0.00        6     0.00     0.00  String#gsub
      0.00     4.81      0.00        2     0.00     0.00  String#upcase
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Inflector.camelize
      0.00     4.81      0.00        2     0.00     0.00  String#camelize
      0.00     4.81      0.00        5     0.00     0.00  Array#uniq!
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Dependencies.loadable_constants_for_path
      0.00     4.81      0.00      278     0.00     0.00  Kernel.is_a?
      0.00     4.81      0.00        4     0.00     0.00  Array#collect
      0.00     4.81      0.00      322     0.00     0.00  ActiveSupport::Dependencies.constant_watch_stack
      0.00     4.81      0.00        8     0.00     0.00  File#directory?
      0.00     4.81      0.00        4     0.00     0.00  ActiveSupport::Dependencies.search_for_file
      0.00     4.81      0.00       16     0.00     0.00  File#file?
      0.00     4.81      0.00       24     0.00     0.00  File#join
      0.00     4.81      0.00        8     0.00     0.00  ActiveSupport::Dependencies.autoload_paths
      0.00     4.81      0.00       50     0.00     0.00  Exception#set_backtrace
      0.00     4.81      0.00       50     0.00     0.00  NameError#initialize
      0.00     4.81      0.00       50     0.00     0.00  Exception#initialize
      0.00     4.81      0.00        4     0.00     0.00  Array#reject
      0.00     4.81      0.00       98     0.00     0.00  Regexp#escape
      0.00     4.81      0.00       23     0.00     0.00  Kernel.caller
      0.00     4.81      0.00        6     0.00     0.00  String#underscore
      0.00     4.81      0.00      374     0.00     0.00  Array#pop
      0.00     4.81      0.00      161     0.00     0.00  ActiveSupport::Dependencies::WatchStack#pop_modules
      0.00     4.81      0.00      161     0.00     9.81  ActiveSupport::Dependencies::WatchStack#new_constants
      0.00     4.81      0.00      163     0.00     0.00  Array#*
      0.00     4.81      0.00        6     0.00     0.00  ActiveSupport::Inflector.underscore
      0.00     4.81      0.00      159     0.00     0.00  Array#blank?
      0.00     4.81      0.00        6     0.00     0.00  String#downcase!
      0.00     4.81      0.00      159     0.00    37.42  ActiveSupport::Dependencies::Loadable.require
      0.00     4.81      0.00        6     0.00     0.00  String#tr!
      0.00     4.81      0.00      124     0.00     0.00  Kernel.respond_to_missing?
      0.00     4.81      0.00       86     0.00     0.00  Kernel.respond_to?
      0.00     4.81      0.00       93     0.00     0.00  Class#inheritable_attributes
      0.00     4.81      0.00      115     0.00     0.00  Kernel.instance_variable_set
      0.00     4.81      0.00       80     0.00     0.00  String#gsub!
      0.00     4.81      0.00      313     0.00     0.00  BasicObject#singleton_method_added
      0.00     4.81      0.00        3     0.00     0.00  BasicObject#initialize
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::LogSubscriber#initialize
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::LogSubscriber#log_subscribers
      0.00     4.81      0.00        1     0.00     0.00  Kernel.public_methods
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Notifications::Fanout#initialize
      0.00     4.81      0.00       25     0.00     0.00  Kernel.dup
      0.00     4.81      0.00        3     0.00     0.00  ActiveSupport::Notifications::Fanout::Subscriber#initialize
      0.00     4.81      0.00        6     0.00     0.00  Kernel.tap
      0.00     4.81      0.00        6     0.00     0.00  Hash#clear
      0.00     4.81      0.00        3     0.00     0.00  ActiveSupport::Notifications::Fanout#subscribe
      0.00     4.81      0.00        3     0.00     3.33  ActiveSupport::Notifications.subscribe
      0.00     4.81      0.00        1     0.00    10.00  ActiveSupport::LogSubscriber#attach_to
      0.00     4.81      0.00       33     0.00     0.00  Kernel.instance_of?
      0.00     4.81      0.00       30     0.00     0.00  Hash#extractable_options?
      0.00     4.81      0.00       54     0.00     0.00  Array#extract_options!
      0.00     4.81      0.00       40     0.00     0.00  Kernel.initialize_dup
      0.00     4.81      0.00       10     0.00     0.00  Class#cattr_reader
      0.00     4.81      0.00       49     0.00     0.00  Kernel.block_given?
      0.00     4.81      0.00       10     0.00     1.00  Class#cattr_writer
      0.00     4.81      0.00       10     0.00     1.00  Class#cattr_accessor
      0.00     4.81      0.00       12     0.00     0.00  Hash#keys
      0.00     4.81      0.00      225     0.00     0.00  NilClass#to_s
      0.00     4.81      0.00       54     0.00     0.00  Symbol#inspect
      0.00     4.81      0.00       11     0.00     0.00  String#initialize_copy
      0.00     4.81      0.00       12     0.00     0.00  Module#alias_method
      0.00     4.81      0.00        1     0.00     0.00  Module#public_method_defined?
      0.00     4.81      0.00        2     0.00     0.00  Module#public
      0.00     4.81      0.00        4     0.00     0.00  ActiveSupport::Dependencies.qualified_name_for
      0.00     4.81      0.00        1     0.00    10.00  ActiveSupport::Deprecation.deprecate_methods
      0.00     4.81      0.00        1     0.00    10.00  Module#deprecate
      0.00     4.81      0.00        8     0.00     0.00  Class#class_attribute
      0.00     4.81      0.00       25     0.00     0.00  Kernel.singleton_class
      0.00     4.81      0.00        7     0.00     0.00  BasicObject#singleton_method_removed
      0.00     4.81      0.00       15     0.00     0.00  Module#remove_method
      0.00     4.81      0.00       15     0.00     0.00  Module#remove_possible_method
      0.00     4.81      0.00       29     0.00     0.00  Module#define_method
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#table_name_prefix=
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#table_name_suffix=
      0.00     4.81      0.00       46     0.00     0.00  Exception#exception
      0.00     4.81      0.00       46     0.00     0.00  Exception#backtrace
      0.00     4.81      0.00        4     0.00     0.00  Class#_stash_object_in_method
      0.00     4.81      0.00        2     0.00     0.00  Class#_superclass_delegating_accessor
      0.00     4.81      0.00        2     0.00     0.00  Class#superclass_delegating_accessor
      0.00     4.81      0.00        2     0.00     0.00  Module#method_removed
      0.00     4.81      0.00        4     0.00     0.00  Class#class_inheritable_reader
      0.00     4.81      0.00        4     0.00     0.00  Class#class_inheritable_writer
      0.00     4.81      0.00        4     0.00     0.00  Class#class_inheritable_accessor
      0.00     4.81      0.00        5     0.00     0.00  Class#write_inheritable_attribute
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#default_scoping=
      0.00     4.81      0.00       29     0.00     0.00  String#to_i
      0.00     4.81      0.00       84     0.00     0.00  BasicObject#equal?
      0.00     4.81      0.00       43     0.00     0.00  Kernel.inspect
      0.00     4.81      0.00       59     0.00     0.00  Module#instance_methods
      0.00     4.81      0.00       53     0.00     0.00  Symbol#to_proc
      0.00     4.81      0.00      330     0.00     0.18  Enumerable.inject
      0.00     4.81      0.00        9     0.00    28.89  Module#delegate
      0.00     4.81      0.00        7     0.00     0.00  Module#attr_accessor
      0.00     4.81      0.00       52     0.00     0.00  Module#private
      0.00     4.81      0.00       28     0.00     0.00  Module#protected
      0.00     4.81      0.00       49     0.00     0.00  Module#append_features
      0.00     4.81      0.00       59     0.00     0.00  Module#included
      0.00     4.81      0.00       46     0.00     5.65  Module#include
      0.00     4.81      0.00       23     0.00     0.00  Module#attr_reader
      0.00     4.81      0.00      331     0.00     0.00  String#sub
      0.00     4.81      0.00       34     0.00     0.00  Module#extended
      0.00     4.81      0.00       62     0.00     0.16  Kernel.extend
      0.00     4.81      0.00       27     0.00     0.00  ActiveSupport::Concern.extended
      0.00     4.81      0.00       59     0.00     0.00  ActiveSupport::Concern.included
      0.00     4.81      0.00      169     0.00     0.00  ActiveSupport::Dependencies.log_call
      0.00     4.81      0.00        7     0.00     0.00  Kernel.instance_variable_get
      0.00     4.81      0.00       42     0.00     6.19  ActiveSupport::Concern.append_features
      0.00     4.81      0.00       50     0.00     0.00  Kernel.nil?
      0.00     4.81      0.00        1     0.00     0.00  File#dirname
      0.00     4.81      0.00        1     0.00     0.00  Dir#[]
      0.00     4.81      0.00        1     0.00     0.00  Array#sort
      0.00     4.81      0.00       11     0.00     0.00  File#basename
      0.00     4.81      0.00       12     0.00     0.00  Kernel.freeze
      0.00     4.81      0.00        1     0.00     0.00  Kernel.lambda
      0.00     4.81      0.00       38     0.00     0.00  Module#<
      0.00     4.81      0.00       38     0.00     0.00  Kernel.object_id
      0.00     4.81      0.00      334     0.00     0.00  ActiveSupport::Dependencies.logger
      0.00     4.81      0.00       31     0.00     0.00  String#intern
      0.00     4.81      0.00       23     0.00     0.00  Hash#initialize_copy
      0.00     4.81      0.00       15     0.00     0.00  Hash#merge
      0.00     4.81      0.00       13     0.00     0.00  ActiveSupport::Callbacks::CallbackChain#initialize
      0.00     4.81      0.00       13     0.00     3.85  Class#extlib_inheritable_reader
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_validate_callbacks
      0.00     4.81      0.00       15     0.00     0.00  Array#reverse_each
      0.00     4.81      0.00       20     0.00     0.00  Array#compact
      0.00     4.81      0.00       24     0.00     0.00  Array#join
      0.00     4.81      0.00       15     0.00     0.00  ActiveSupport::Callbacks::CallbackChain#compile
      0.00     4.81      0.00       18     0.00     0.00  Module#method_defined?
      0.00     4.81      0.00       15     0.00     0.00  Kernel.with_warnings
      0.00     4.81      0.00       15     0.00     0.00  Kernel.silence_warnings
      0.00     4.81      0.00       15     0.00     0.00  ActiveSupport::Callbacks::ClassMethods.__define_runner
      0.00     4.81      0.00       11     0.00     5.45  ActiveSupport::Callbacks::ClassMethods.define_callbacks
      0.00     4.81      0.00        5     0.00     0.00  Module#attr_writer
      0.00     4.81      0.00        3     0.00     0.00  Hash#initialize
      0.00     4.81      0.00        3     0.00     0.00  ActiveRecord::Base#_validators=
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#lock_optimistically=
      0.00     4.81      0.00        6     0.00     0.00  Class#read_inheritable_attribute
      0.00     4.81      0.00        6     0.00     0.00  ActiveModel::AttributeMethods::ClassMethods.attribute_method_matchers
      0.00     4.81      0.00      681     0.00     0.00  Module#const_get
      0.00     4.81      0.00       19     0.00     0.00  Hash#delete
      0.00     4.81      0.00       10     0.00     0.00  Hash#symbolize_keys!
      0.00     4.81      0.00        9     0.00     0.00  ActiveModel::AttributeMethods::ClassMethods::AttributeMethodMatcher#initialize
      0.00     4.81      0.00        1     0.00     0.00  Module#initialize
      0.00     4.81      0.00        6     0.00     0.00  ActiveModel::AttributeMethods::ClassMethods.generated_attribute_methods
      0.00     4.81      0.00        6     0.00     0.00  ActiveModel::AttributeMethods::ClassMethods.undefine_attribute_methods
      0.00     4.81      0.00        5     0.00     0.00  ActiveModel::AttributeMethods::ClassMethods.attribute_method_suffix
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#attribute_types_cached_by_default=
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#time_zone_aware_attributes=
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#skip_time_zone_conversion_for_attributes=
      0.00     4.81      0.00        1     0.00     0.00  ActiveModel::AttributeMethods::ClassMethods.attribute_method_affix
      0.00     4.81      0.00        1     0.00     0.00  Singleton.append_features
      0.00     4.81      0.00        1     0.00     0.00  Module#private_class_method
      0.00     4.81      0.00        3     0.00     0.00  Mutex#initialize
      0.00     4.81      0.00        8     0.00    26.25  BasicObject#instance_eval
      0.00     4.81      0.00        1     0.00     0.00  Singleton.__init__
      0.00     4.81      0.00        1     0.00     0.00  Singleton.included
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#record_timestamps=
      0.00     4.81      0.00        1     0.00     0.00  ActiveModel::Callbacks.extended
      0.00     4.81      0.00       27     0.00     1.85  ActiveRecord::Callbacks::ClassMethods.method_added
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_validation_callbacks
      0.00     4.81      0.00       10     0.00     0.00  Array#wrap
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_initialize_callbacks
      0.00     4.81      0.00        7     0.00     0.00  ActiveModel::Callbacks._define_after_model_callback
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_find_callbacks
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_touch_callbacks
      0.00     4.81      0.00        2     0.00    10.00  ActiveModel::Callbacks.define_model_callbacks
      0.00     4.81      0.00        7     0.00     0.00  Array#to_ary
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_save_callbacks
      0.00     4.81      0.00        4     0.00     0.00  ActiveModel::Callbacks._define_before_model_callback
      0.00     4.81      0.00        4     0.00     0.00  ActiveModel::Callbacks._define_around_model_callback
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_create_callbacks
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_update_callbacks
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_destroy_callbacks
      0.00     4.81      0.00        9     0.00     0.00  Module#autoload
      0.00     4.81      0.00        5     0.00     2.00  Module#mattr_reader
      0.00     4.81      0.00        5     0.00     0.00  Module#mattr_writer
      0.00     4.81      0.00        5     0.00     2.00  Module#mattr_accessor
      0.00     4.81      0.00        1     0.00     0.00  Kernel.proc
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#nested_attributes_options=
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Associations::ClassMethods.valid_keys_for_has_one_association
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Associations::ClassMethods.valid_keys_for_belongs_to_association
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Associations::ClassMethods.valid_keys_for_has_many_association
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Associations::ClassMethods.valid_keys_for_has_and_belongs_to_many_association
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::JSON::Encoding.escape_html_entities_in_json=
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Deprecation::DeprecatedConstantProxy#initialize
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Deprecation::DeprecationProxy#new
      0.00     4.81      0.00        3     0.00     0.00  String#initialize
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#include_root_in_json=
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_commit_callbacks
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#_rollback_callbacks
      0.00     4.81      0.00        2     0.00     0.00  Module#public_instance_methods
      0.00     4.81      0.00        1     0.00    10.00  NilClass#add_whiner
      0.00     4.81      0.00       39     0.00     0.00  Kernel.class
      0.00     4.81      0.00        2     0.00     0.00  Enumerable.each_entry
      0.00     4.81      0.00        2     0.00     0.00  Set#do_with_enum
      0.00     4.81      0.00        2     0.00     0.00  Set#merge
      0.00     4.81      0.00        2     0.00     0.00  Set#initialize
      0.00     4.81      0.00        2     0.00     0.00  Enumerable.to_set
      0.00     4.81      0.00        2     0.00     0.00  Struct#new
      0.00     4.81      0.00        3     0.00     0.00  Module#method_undefined
      0.00     4.81      0.00        3     0.00     0.00  Module#undef_method
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::ConnectionHandler#initialize
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#connection_handler=
      0.00     4.81      0.00        4     0.00     0.00  ActiveRecord::Base#inspect
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::QueryCache.dirties_query_cache
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::QueryCache.included
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::AbstractAdapter#_checkout_callbacks
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::AbstractAdapter#_checkin_callbacks
      0.00     4.81      0.00        1     0.00     0.00  Arel::Sql::Engine#initialize
      0.00     4.81      0.00        1     0.00     0.00  Arel::Table#engine=
      0.00     4.81      0.00        7     0.00    30.00  ActiveSupport.execute_hook
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#default_timezone=
      0.00     4.81      0.00        6     0.00     0.00  ActiveRecord::Base#logger
      0.00     4.81      0.00        1     0.00     0.00  Rails.logger
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#logger=
      0.00     4.81      0.00        3     0.00     0.00  Rails::Application::Configurable.config
      0.00     4.81      0.00        2     0.00     0.00  Hash#key?
      0.00     4.81      0.00        1     0.00     0.00  Rails::Railtie::Configuration#method_missing
      0.00     4.81      0.00        5     0.00     0.00  Hash#each
      0.00     4.81      0.00        1     0.00     0.00  Rails::Application::Configuration#paths
      0.00     4.81      0.00        2     0.00     0.00  Rails::Paths::PathParent.method_missing
      0.00     4.81      0.00        2     0.00     0.00  Pathname#to_s
      0.00     4.81      0.00        1     0.00     0.00  Array#flatten!
      0.00     4.81      0.00        1     0.00     0.00  Rails::Paths::Path#paths
      0.00     4.81      0.00        1     0.00     0.00  IO#read
      0.00     4.81      0.00       36     0.00     0.00  BasicObject#==
      0.00     4.81      0.00        3     0.00     0.00  Fixnum#===
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler#prepare_trim_mode
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler#initialize
      0.00     4.81      0.00        8     0.00     0.00  Array#push
      0.00     4.81      0.00        1     0.00     0.00  ERB#set_eoutvar
      0.00     4.81      0.00        1     0.00     0.00  String#encoding
      0.00     4.81      0.00        1     0.00     0.00  Encoding#dummy?
      0.00     4.81      0.00        2     0.00     0.00  String#force_encoding
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler#detect_magic_comment
      0.00     4.81      0.00        1     0.00     0.00  Encoding#to_s
      0.00     4.81      0.00        3     0.00     0.00  ERB::Compiler::Buffer#push
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler::Buffer#initialize
      0.00     4.81      0.00       80     0.00     0.00  Kernel.hash
      0.00     4.81      0.00        1     0.00     0.00  Array#hash
      0.00     4.81      0.00        2     0.00     0.00  Kernel.eql?
      0.00     4.81      0.00        1     0.00     0.00  Array#eql?
      0.00     4.81      0.00        1     0.00     0.00  Hash#fetch
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler::Scanner#initialize
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler::Scanner#make_scanner
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler#make_scanner
      0.00     4.81      0.00        1     0.00     0.00  StringScanner#initialize
      0.00     4.81      0.00        2     0.00     0.00  StringScanner#eos?
      0.00     4.81      0.00        1     0.00     0.00  StringScanner#scan
      0.00     4.81      0.00        2     0.00     0.00  StringScanner#[]
      0.00     4.81      0.00        1     0.00     0.00  Symbol#===
      0.00     4.81      0.00        8     0.00     0.00  String#===
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler::SimpleScanner2#scan
      0.00     4.81      0.00        1     0.00     0.00  String#count
      0.00     4.81      0.00        1     0.00     0.00  String#dump
      0.00     4.81      0.00        1     0.00     0.00  String#*
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler#content_dump
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler::Buffer#close
      0.00     4.81      0.00        1     0.00     0.00  ERB::Compiler#compile
      0.00     4.81      0.00        1     0.00     0.00  ERB#initialize
      0.00     4.81      0.00        1     0.00     0.00  String#concat
      0.00     4.81      0.00        1     0.00     0.00  Kernel.eval
      0.00     4.81      0.00        1     0.00     0.00  ERB#result
      0.00     4.81      0.00        1     0.00     0.00  Syck::Parser#initialize
      0.00     4.81      0.00        1     0.00     0.00  Syck.resolver
      0.00     4.81      0.00        1     0.00     0.00  Syck::Parser#set_resolver
      0.00     4.81      0.00        1     0.00     0.00  Syck.parser
      0.00     4.81      0.00       31     0.00     0.00  #<Syck::Resolver:0x9512a8>.node_import
      0.00     4.81      0.00        1     0.00     0.00  Syck::Parser#load
      0.00     4.81      0.00        1     0.00     0.00  Syck.load
      0.00     4.81      0.00        1     0.00    20.00  Rails::Application::Configuration#database_configuration
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#configurations=
      0.00     4.81      0.00        4     0.00     0.00  Kernel.===
      0.00     4.81      0.00        1     0.00     0.00  Rails.env
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#configurations
      0.00     4.81      0.00       14     0.00     0.00  String#to_sym
      0.00     4.81      0.00        1     0.00     0.00  String#eql?
      0.00     4.81      0.00        1     0.00     0.00  Hash#symbolize_keys
      0.00     4.81      0.00        3     0.00     0.00  Proc#yield
      0.00     4.81      0.00        8     0.00     0.00  ActiveSupport::DescendantsTracker.direct_descendants
      0.00     4.81      0.00        4     0.00     0.00  ActiveSupport::DescendantsTracker.inherited
      0.00     4.81      0.00      107     0.00     0.09  Regexp#===
      0.00     4.81      0.00        3     0.00     0.00  ActiveRecord::DynamicFinderMatch#initialize
      0.00     4.81      0.00        3     0.00     0.00  ActiveRecord::DynamicFinderMatch#match
      0.00     4.81      0.00        3     0.00     0.00  ActiveRecord::DynamicScopeMatch#initialize
      0.00     4.81      0.00        3     0.00     0.00  ActiveRecord::DynamicScopeMatch#match
      0.00     4.81      0.00      738     0.00     0.00  Module#const_defined?
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::ConnectionHandler#remove_connection
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base#remove_connection
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::Base::ConnectionSpecification#initialize
      0.00     4.81      0.00        1     0.00     0.00  MonitorMixin.mon_initialize
      0.00     4.81      0.00        1     0.00     0.00  MonitorMixin.initialize
      0.00     4.81      0.00        1     0.00     0.00  ConditionVariable#initialize
      0.00     4.81      0.00        1     0.00     0.00  MonitorMixin::ConditionVariable#initialize
      0.00     4.81      0.00        1     0.00     0.00  MonitorMixin.new_cond
      0.00     4.81      0.00        1     0.00     0.00  String#<=>
      0.00     4.81      0.00        1     0.00     0.00  Comparable.<
      0.00     4.81      0.00        1     0.00     0.00  Integer#to_i
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::ConnectionPool#initialize
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::ConnectionHandler#establish_connection
      0.00     4.81      0.00        4     0.00   135.00  ActiveRecord::Base#establish_connection
      0.00     4.81      0.00        1     0.00     0.00  Array#shift
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::DescendantsTracker.descendants
      0.00     4.81      0.00        2     0.00     0.00  ActionDispatch::Callbacks#_call_callbacks
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Callbacks::Callback#normalize_options!
      0.00     4.81      0.00        4     0.00     0.00  ActiveSupport::Callbacks::Callback#next_id
      0.00     4.81      0.00        1     0.00     0.00  Proc#arity
      0.00     4.81      0.00        2     0.00     5.00  ActiveSupport::Callbacks::Callback#_compile_filter
      0.00     4.81      0.00        4     0.00     0.00  ActiveSupport::Callbacks::Callback#_compile_options
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Callbacks::Callback#_compile_per_key_options
      0.00     4.81      0.00        2     0.00     5.00  ActiveSupport::Callbacks::Callback#initialize
      0.00     4.81      0.00        3     0.00     0.00  ActiveSupport::Callbacks::Callback#matches?
      0.00     4.81      0.00        2     0.00     0.00  Array#delete_if
      0.00     4.81      0.00        5     0.00     0.00  ActiveSupport::Callbacks::Callback#start
      0.00     4.81      0.00        5     0.00     0.00  ActiveSupport::Callbacks::Callback#end
      0.00     4.81      0.00        2     0.00     5.00  ActiveSupport::Callbacks::ClassMethods.__update_callbacks
      0.00     4.81      0.00        2     0.00     5.00  ActiveSupport::Callbacks::ClassMethods.set_callback
      0.00     4.81      0.00        1     0.00     0.00  ActionDispatch::Callbacks#after
      0.00     4.81      0.00        1     0.00     0.00  ActiveModel::Observing::ClassMethods.observers
      0.00     4.81      0.00        1     0.00     0.00  ActiveModel::Observing::ClassMethods.instantiate_observers
      0.00     4.81      0.00        2     0.00     0.00  ActionDispatch::Callbacks#_prepare_callbacks
      0.00     4.81      0.00        1     0.00    10.00  ActionDispatch::Callbacks#to_prepare
      0.00     4.81      0.00        1     0.00   210.00  ActiveSupport.run_load_hooks
      0.00     4.81      0.00        8     0.00     0.00  Object#duplicable?
      0.00     4.81      0.00        6     0.00     0.00  Array#initialize_copy
      0.00     4.81      0.00       10     0.00     0.00  Hash#update
      0.00     4.81      0.00        2     0.00     0.00  TrueClass#duplicable?
      0.00     4.81      0.00        2     0.00     0.00  ActiveModel::Validations::ClassMethods.inherited
      0.00     4.81      0.00        2     0.00     0.00  ActiveModel::Observing::ClassMethods.notify_observers
      0.00     4.81      0.00        2     0.00     0.00  ActiveModel::Observing::ClassMethods.inherited
      0.00     4.81      0.00      347     0.00     0.00  Array#first
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Dependencies.autoload_once_paths
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Dependencies.load_once_path?
      0.00     4.81      0.00        4     0.00     0.00  ActiveSupport::Dependencies.autoloaded_constants
      0.00     4.81      0.00        2     0.00  2275.00  ActiveSupport::Dependencies.load_file
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Dependencies.history
      0.00     4.81      0.00        2     0.00  2275.00  ActiveSupport::Dependencies.require_or_load
      0.00     4.81      0.00      345     0.00     0.00  Array#empty?
      0.00     4.81      0.00        4     0.00     0.00  String#scan
      0.00     4.81      0.00        4     0.00     0.00  Class#superclass
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#class_of_active_record_descendant
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#base_class
      0.00     4.81      0.00        6     0.00     0.00  Enumerable.detect
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#full_table_name_prefix
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Inflector.demodulize
      0.00     4.81      0.00        2     0.00     0.00  String#demodulize
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#pluralize_table_names
      0.00     4.81      0.00        4     0.00     0.00  ActiveSupport::Inflector::Inflections#instance
      0.00     4.81      0.00        4     0.00     0.00  ActiveSupport::Inflector.inflections
      0.00     4.81      0.00        4     0.00     0.00  String#downcase
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::Inflector.pluralize
      0.00     4.81      0.00        2     0.00     0.00  String#pluralize
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#undecorated_table_name
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#compute_table_name
      0.00     4.81      0.00        2     0.00     0.00  String#inspect
      0.00     4.81      0.00        2     0.00     0.00  ActiveModel::AttributeMethods::ClassMethods.define_attr_method
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#set_table_name
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#reset_table_name
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::Base#table_name
      0.00     4.81      0.00        1     0.00     0.00  Arel::Table#engine
      0.00     4.81      0.00        4     0.00     0.00  ActiveRecord::Base#arel_engine
      0.00     4.81      0.00        3     0.00     0.00  Arel::Sql::Christener#initialize
      0.00     4.81      0.00        6     0.00     0.00  ActiveRecord::ConnectionAdapters::ConnectionHandler#retrieve_connection_pool
      0.00     4.81      0.00       17     0.00     0.00  Thread#current
      0.00     4.81      0.00        6     0.00     0.00  ActiveRecord::ConnectionAdapters::ConnectionPool#current_connection_id
      0.00     4.81      0.00        2     0.00     0.00  Mutex#lock
      0.00     4.81      0.00        1     0.00     0.00  MonitorMixin.mon_enter
      0.00     4.81      0.00        2     0.00     0.00  Rails.application
      0.00     4.81      0.00        1     0.00     0.00  Rails.root
      0.00     4.81      0.00        1     0.00     0.00  SQLite3::Database#initialize
      0.00     4.81      0.00        1     0.00     0.00  SQLite3::Database#busy_timeout
      0.00     4.81      0.00        2     0.00     0.00  Thread#[]
      0.00     4.81      0.00        1     0.00     0.00  OpenSSL::Random.random_bytes
      0.00     4.81      0.00        1     0.00     0.00  SecureRandom.random_bytes
      0.00     4.81      0.00        1     0.00     0.00  String#unpack
      0.00     4.81      0.00        1     0.00     0.00  SecureRandom.hex
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Notifications::Instrumenter#unique_id
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Notifications::Instrumenter#initialize
      0.00     4.81      0.00        3     0.00     0.00  Thread#[]=
      0.00     4.81      0.00        5     0.00     0.00  Array#unshift
      0.00     4.81      0.00        1     0.00   110.00  ActiveRecord::ConnectionAdapters::AbstractAdapter#initialize
      0.00     4.81      0.00        1     0.00   110.00  ActiveRecord::ConnectionAdapters::SQLiteAdapter#initialize
      0.00     4.81      0.00        1     0.00   110.00  ActiveRecord::Base#sqlite3_connection
      0.00     4.81      0.00        1     0.00   110.00  ActiveRecord::ConnectionAdapters::ConnectionPool#new_connection
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::AbstractAdapter#active?
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::AbstractAdapter#verify!
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::AbstractAdapter#_run_checkout_callbacks
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Callbacks.run_callbacks
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::ConnectionPool#checkout_and_verify
      0.00     4.81      0.00        1     0.00   110.00  ActiveRecord::ConnectionAdapters::ConnectionPool#checkout_new_connection
      0.00     4.81      0.00      355     0.00     0.00  String#to_s
      0.00     4.81      0.00        1     0.00     0.00  MonitorMixin.mon_check_owner
      0.00     4.81      0.00        2     0.00     0.00  Mutex#unlock
      0.00     4.81      0.00        1     0.00     0.00  MonitorMixin.mon_exit
      0.00     4.81      0.00        1     0.00   110.00  MonitorMixin.mon_synchronize
      0.00     4.81      0.00        1     0.00   110.00  ActiveRecord::ConnectionAdapters::ConnectionPool#checkout
      0.00     4.81      0.00        6     0.00    18.33  ActiveRecord::ConnectionAdapters::ConnectionPool#connection
      0.00     4.81      0.00        6     0.00    18.33  ActiveRecord::ConnectionAdapters::ConnectionHandler#retrieve_connection
      0.00     4.81      0.00        6     0.00    18.33  ActiveRecord::Base#retrieve_connection
      0.00     4.81      0.00      191     0.00     0.00  Module#name
      0.00     4.81      0.00        6     0.00    20.00  Arel::Sql::Engine#connection
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::ConnectionAdapters::SQLiteAdapter#adapter_name
      0.00     4.81      0.00        2     0.00     0.00  Arel::Sql::Engine#adapter_name
      0.00     4.81      0.00        2     0.00     0.00  Time#initialize
      0.00     4.81      0.00        2     0.00     0.00  Time#now
      0.00     4.81      0.00       19     0.00     0.00  SQLite3::Database#encoding
      0.00     4.81      0.00        3     0.00     0.00  SQLite3::Statement#initialize
      0.00     4.81      0.00       16     0.00     0.00  Array#flatten
      0.00     4.81      0.00        1     0.00     0.00  SQLite3::Statement#bind_params
      0.00     4.81      0.00       16     0.00     0.00  SQLite3::Statement#step
      0.00     4.81      0.00       16     0.00     0.00  SQLite3::Statement#done?
      0.00     4.81      0.00        3     0.00     0.00  SQLite3::Statement#column_count
      0.00     4.81      0.00       13     0.00     0.00  SQLite3::Statement#column_name
      0.00     4.81      0.00       13     0.00     0.00  SQLite3::Statement#column_decltype
      0.00     4.81      0.00        3     0.00     0.00  Integer#times
      0.00     4.81      0.00        3     0.00     0.00  SQLite3::Statement#get_metadata
      0.00     4.81      0.00        5     0.00     0.00  SQLite3::Statement#columns
      0.00     4.81      0.00       15     0.00     0.00  Array#zip
      0.00     4.81      0.00        3     0.00     0.00  Enumerable.each_with_index
      0.00     4.81      0.00        3     0.00     6.67  SQLite3::Statement#each
      0.00     4.81      0.00        3     0.00     3.33  Enumerable.map
      0.00     4.81      0.00        3     0.00     0.00  SQLite3::Statement#close
      0.00     4.81      0.00        3     0.00     3.33  SQLite3::Database#prepare
      0.00     4.81      0.00        1     0.00    10.00  SQLite3::Database#execute
      0.00     4.81      0.00        3     0.00     0.00  ActiveSupport::Notifications::Fanout::Subscriber#subscribed_to?
      0.00     4.81      0.00        1     0.00     0.00  Array#select
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Notifications::Fanout#listeners_for
      0.00     4.81      0.00        4     0.00     0.00  ActiveRecord::LogSubscriber#logger
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Duration#===
      0.00     4.81      0.00        1     0.00     0.00  Float#/
      0.00     4.81      0.00        1     0.00     0.00  Float#quo
      0.00     4.81      0.00        1     0.00     0.00  Time#minus_without_duration
      0.00     4.81      0.00        1     0.00     0.00  Time#minus_with_duration
      0.00     4.81      0.00        1     0.00     0.00  Time#minus_with_coercion
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Notifications::Event#initialize
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::LogSubscriber#runtime
      0.00     4.81      0.00        1     0.00     0.00  Fixnum#+
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::LogSubscriber#runtime=
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::BufferedLogger#debug?
      0.00     4.81      0.00        1     0.00     0.00  String#%
      0.00     4.81      0.00        1     0.00     0.00  String#squeeze
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::LogSubscriber#odd?
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::LogSubscriber#colorize_logging
      0.00     4.81      0.00        2     0.00     0.00  ActiveSupport::LogSubscriber#color
      0.00     4.81      0.00        4     0.00     0.00  ActiveSupport::BufferedLogger#buffer
      0.00     4.81      0.00        1     0.00     0.00  StringIO#initialize
      0.00     4.81      0.00        1     0.00     0.00  StringIO#write
      0.00     4.81      0.00        1     0.00     0.00  StringIO#<<
      0.00     4.81      0.00        1     0.00     0.00  StringIO#string
      0.00     4.81      0.00        1     0.00     0.00  IO#write
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::BufferedLogger#clear_buffer
      0.00     4.81      0.00        1     0.00     0.00  Mutex#synchronize
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::BufferedLogger#flush
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::BufferedLogger#auto_flush
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::BufferedLogger#add
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::BufferedLogger#debug
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::LogSubscriber#debug
      0.00     4.81      0.00        1     0.00     0.00  ActiveRecord::LogSubscriber#sql
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::LogSubscriber#call
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Notifications::Fanout::Subscriber#publish
      0.00     4.81      0.00        1     0.00     0.00  ActiveSupport::Notifications::Fanout#publish
      0.00     4.81      0.00        1     0.00    10.00  ActiveSupport::Notifications::Instrumenter#instrument
      0.00     4.81      0.00        1     0.00    10.00  ActiveRecord::ConnectionAdapters::AbstractAdapter#log
      0.00     4.81      0.00        1     0.00    10.00  ActiveRecord::ConnectionAdapters::SQLiteAdapter#execute
      0.00     4.81      0.00        4     0.00     0.00  Module#parents
      0.00     4.81      0.00        2     0.00    75.00  Arel::Table#initialize
      0.00     4.81      0.00        2     0.00    80.00  ActiveRecord::Base#arel_table
      0.00     4.81      0.00        1     0.00     0.00  Struct#initialize
      0.00     4.81      0.00        1     0.00     0.00  Arel::Relation::JoinOperation#new
      0.00     4.81      0.00        1     0.00     0.00  Arel::Relation.join
      0.00     4.81      0.00        2     0.00     0.00  Arel::Table#table_exists?
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::ConnectionAdapters::SQLiteAdapter#quote_column_name
      0.00     4.81      0.00        2     0.00     0.00  ActiveRecord::ConnectionAdapters::AbstractAdapter#quote_table_name
      0.00     4.81      0.00        2     0.00     0.00  SQLite3.libversion
      0.00     4.81      0.00        2     0.00     0.00  Fixnum#<=>
      0.00     4.81      0.00        4     0.00     0.00  Enumerable.max
      0.00     4.81      0.00        2     0.00     0.00  SQLite3::Pragmas.version_compare
      0.00     4.81      0.00       40     0.00     0.00  NoMethodError#initialize
      0.00     4.81      0.00       10     0.00     0.00  Kernel.raise
      0.00     4.81      0.00       10     0.00     0.00  NilClass#raise_nil_warning_for
      0.00     4.81      0.00      169     0.00     0.00  String#blank?
      0.00     4.81      0.00       10     0.00     0.00  SQLite3::Pragmas.tweak_default
      0.00     4.81      0.00        2     0.00     5.00  SQLite3::Pragmas.table_info
      0.00     4.81      0.00        2     0.00     5.00  ActiveRecord::ConnectionAdapters::SQLiteAdapter#table_structure
      0.00     4.81      0.00       10     0.00     0.00  ActiveRecord::ConnectionAdapters::Column#extract_limit
      0.00     4.81      0.00       10     0.00     0.00  ActiveRecord::ConnectionAdapters::Column#extract_precision
      0.00     4.81      0.00       10     0.00     0.00  ActiveRecord::ConnectionAdapters::Column#extract_scale
      0.00     4.81      0.00      169     0.00     0.00  Kernel.!~
      0.00     4.81      0.00       10     0.00     0.00  ActiveRecord::ConnectionAdapters::Column#type_cast
      0.00     4.81      0.00       10     0.00     0.00  ActiveRecord::ConnectionAdapters::Column#extract_default
      0.00     4.81      0.00       10     0.00     1.00  ActiveRecord::ConnectionAdapters::Column#initialize
      0.00     4.81      0.00        2     0.00    10.00  ActiveRecord::ConnectionAdapters::SQLiteAdapter#columns
      0.00     4.81      0.00        2     0.00    10.00  Arel::Table#columns
      0.00     4.81      0.00       10     0.00     0.00  Arel::Sql::Attributes.for
      0.00     4.81      0.00       72     0.00     0.00  Arel::Attribute#root
      0.00     4.81      0.00       32     0.00     0.00  Arel::Attribute#initialize
      0.00     4.81      0.00       10     0.00     0.00  Arel::Sql::Attributes.initialize
      0.00     4.81      0.00        6     0.00     0.00  Arel::Header#initialize
      0.00     4.81      0.00        7     0.00     2.86  Arel::Table#attributes
      0.00     4.81      0.00        9     0.00     0.00  Arel::Attribute#named?
      0.00     4.81      0.00        5     0.00     0.00  Arel::Header#find_by_name
      0.00     4.81      0.00        7     0.00     1.43  Arel::Header#[]
      0.00     4.81      0.00        7     0.00     4.29  Arel::Relation.[]
      0.00     4.81      0.00        6     0.00     0.00  Arel::Predicates::Unary#initialize
      0.00     4.81      0.00        6     0.00     0.00  Arel::Predicates::Binary#initialize
      0.00     4.81      0.00        3     0.00     0.00  Arel::Attribute#eq
      0.00     4.81      0.00        1     0.00     0.00  Arel::Relation::JoinOperation#join_class
      0.00     4.81      0.00        1     0.00     0.00  Arel::Relation::JoinOperation#relation1
      0.00     4.81      0.00        1     0.00     0.00  Arel::Relation::JoinOperation#relation2
      0.00     4.81      0.00        1     0.00     0.00  Arel::Join#initialize
      0.00     4.81      0.00        1     0.00     0.00  Arel::Relation::JoinOperation#on
      0.00     4.81      0.00        1     0.00     0.00  Arel::Join#engine
      0.00     4.81      0.00        3     0.00     0.00  Arel::Compound#initialize
      0.00     4.81      0.00        2     0.00     0.00  Arel::Relation.externalizable?
      0.00     4.81      0.00        2     0.00     0.00  Arel::Relation.externalize
      0.00     4.81      0.00        6     0.00     0.00  Arel::Header#to_ary
      0.00     4.81      0.00       30     0.00     0.00  Arel::Attribute#==
      0.00     4.81      0.00        1     0.00     0.00  Array#|
      0.00     4.81      0.00        1     0.00     0.00  Arel::Header#new
      0.00     4.81      0.00        1     0.00     0.00  Arel::Header#union
      0.00     4.81      0.00       22     0.00     0.00  Arel::Attribute#bind
      0.00     4.81      0.00        4     0.00     2.50  Arel::Header#each
      0.00     4.81      0.00        2     0.00     0.00  Arel::Header#bind
      0.00     4.81      0.00        2     0.00     0.00  Arel::Join#attributes
      0.00     4.81      0.00        2     0.00     5.00  Enumerable.select
      0.00     4.81      0.00        2     0.00     5.00  Arel::Header#matching
      0.00     4.81      0.00        2     0.00     5.00  Arel::Header#find_by_attribute
      0.00     4.81      0.00        2     0.00     5.00  Arel::Attribute#find_correlate_in
      0.00     4.81      0.00        2     0.00     0.00  Arel::Value#initialize
      0.00     4.81      0.00        2     0.00     0.00  Arel::ObjectExtensions.bind
      0.00     4.81      0.00        2     0.00     0.00  Arel::ObjectExtensions.find_correlate_in
      0.00     4.81      0.00        2     0.00     5.00  Arel::Predicates::Binary#bind
      0.00     4.81      0.00        2     0.00     5.00  Arel::Where#initialize
      0.00     4.81      0.00        2     0.00     5.00  Arel::Relation.where
      0.00     4.81      0.00        1     0.00     0.00  Arel::Predicates::Equality#complement
      0.00     4.81      0.00        1     0.00     0.00  Arel::Predicates::Predicate#not
      0.00     4.81      0.00        1     0.00     0.00  Arel::Compound#attributes
      0.00     4.81      0.00      169     0.00     0.00  String#=~
      0.00     4.81      0.00        1     0.00    10.00  Arel::Relation.project
      0.00     4.81      0.00        1     0.00    30.00  Dead#kennedy
      0.00     4.81      0.00        1     0.00    30.00  Object#profile_me
      0.00     4.81      0.00        1     0.00  4810.00  #toplevel
    
  • James Harton

    James Harton September 3rd, 2010 @ 05:21 AM

    Oh, and the other thing I have learned is that the amount of RAM is directly proportional to the number of fields each table has and is not related to the database driver.

  • Rohit Arondekar

    Rohit Arondekar December 12th, 2010 @ 02:13 AM

    • Importance changed from “” to “Low”

    James, can you confirm this on the latest version 3 release?

  • rails

    rails March 13th, 2011 @ 12:00 AM

    • Tag changed from arel 1.0.1, memory leak, rails 3.0.0, arel, performance, rails3 to arel 101, memory leak, rails 300, arel, performance, rails3
    • State changed from “new” to “open”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • rails

    rails March 13th, 2011 @ 12:00 AM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages