[Ironruby-core] ActiveRecord loading veeeery slow

Eduardo Blumenfeld lists at ruby-forum.com
Sat Aug 7 14:21:51 EDT 2010


Hi all,

I'm having a performance issue when loading activerecord:

I'm timing it in this code
-----------------------
puts Time.now.to_s + "rubygems"
require 'rubygems'
puts Time.now.to_s + "activerecord"
require 'active_record'
puts Time.now.to_s + "activesupport"
require 'active_support'
#require 'acts_as_list'
puts Time.now.to_s + "yaml"
require 'yaml'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlserver',
:database => 'db',
:username => 'sa',
:password => 'password',
:mode => 'ADONET',
:host =>  "machine\\instance")
puts Time.now.to_s + 'classes'
...... (loads all the classes

-----------------------
The results are:

Sat Aug 07 13:49:08 -0400 2010rubygems
Sat Aug 07 13:49:09 -0400 2010activerecord
WARNING: YAML.add_builtin_type is not implemented
Sat Aug 07 13:49:22 -0400 2010activesupport
Sat Aug 07 13:49:22 -0400 2010yaml
Sat Aug 07 13:49:23 -0400 2010connection
Sat Aug 07 13:49:43 -0400 2010classes

as you can see the time to load activerecord is 13 seconds,
and the time to establish the connection is 20 seconds,

Once everything is established, the system really works fine
regarding response time with the database.

Is there anything I could do to improve the startup speed with
activerecord and activerecord-sqlserver-adapter standard gems?

Is there any relation with the YAML.add_builtin_type not implemented
warning?

Thank you all in advance,

Eduardo Blumenfeld
-- 
Posted via http://www.ruby-forum.com/.


More information about the Ironruby-core mailing list