similar to: Review Request for Significant Performance Improvement in ActiveRecord

Displaying 20 results from an estimated 7000 matches similar to: "Review Request for Significant Performance Improvement in ActiveRecord"

2007 Sep 25
2
Patch Review for selective joining of eager-loaded tables in pre-query
For those of you following the earlier saga of the performance of limited eager loading, I''ve decided to give up on pursuing my original patch. I received some support on the simplification argument (see my blog if you don''t know what I''m talking about), but it doesn''t seem like it''s worth breaking existing behavior. So I''m moving onto
2006 Sep 03
1
New Technique: Subsets of has_many Associations
I just now thought of this, and sure enough it works like a charm (at least so far in my limited testing): has_many :events, :dependent => :delete_all has_many :upcoming_events, :class_name => "Event", :conditions => "date > NOW()" The purpose of this is that it makes eager loading of subsets of associations possible without replacing all the magic of the
2007 Jul 06
4
JOINS clobbering ids or other fields.
I just found this ticket because I noticed the same issue. http://dev.rubyonrails.org/ticket/6251 The official response was that it''s not a bug because when you use :joins you are "riding close to the metal". But I''m at a loss as to figure out why this behavior even needs to exist. Every table (except HABTM links) in a typical Rails app is going to have an id
2007 May 19
3
form question
Suppose I have the following models/migrations: class Car < ActiveRecord::Base belongs_to :manufacturer validates_presence_of :manufacturer validates_association :manufacturer end class CreateCars < ActiveRecord::Migration def self.up create_table cars do |t| t.column :name, :string t.column :manufacturer_id, :integer end end class Manufacturer <
2009 Mar 25
11
ActiveRecord: Nested :include erroneous behavior
Hi, Found a simple example breaking on moving to 2.2 from 2.0. This example illustrates the usage of nested :include finder options. class Book < ActiveRecord::Base has_many :distributors end class Distributor < ActiveRecord::Base belongs_to :book has_many :agents end class Agent < ActiveRecord::Base belongs_to :distributor has_many :shops end class Shop <
2008 Aug 29
2
IPMI and Dell ERA/O
Hi Everyone, I have a dell 1750 server with ERA/O card running on FreeBSD 7.0-STABLE According to Dell, the ERA card supports ipmi 1.0: http://linux.dell.com/ipmi.shtml But so far no luck with freebsd :/ [root@home /usr/src/sys/i386/conf]# ipmitool -I open channel info 1 Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
2009 Oct 05
2
domain names within app
Hi- I have an shopping cart rails app. I would like to be able to host multiple domain names within the same shopping cart application. I would like to be able to detect the domain name, and then set a parameter that tells what logo to display for that domain name. Does anyone know how this can be done? Thanks, Clark
2008 Sep 03
5
Eager load associations in Oracle problem with more than 1000 records
I think Rails 2.1 introduced a bug when eager loading of associations with Oracle. In 2.1 ActiveRecord loads the included table with a big ''IN'' query: ''where association.id in (1, 2, 3, 4...)''. The problem is that Oracle has a hard limit of 1000 values in an IN clause. I get this error: ''OCIError: ORA-01795: maximum number of expressions in a list
2008 Apr 21
2
Eager Loading Polymorphic Associations
Hi, I''m searching for a method of eager loading polymorphic associations under activerecord 2.0.2. After some initial google-fu I came up with a link to an enhancement that''s been added to edge: http://dev.rubyonrails.org/ticket/8119 Anyone have any idea how long that might take to work its way into a general release? I''m early in development now so I can afford to
2013 Feb 28
2
[LLVMdev] Timing the IRReader
Hi, While doing various profiling runs of llc, it's easy to notice that some wall-clock time is not accounted for by -time-passes (e.g. only 7 out of 9.2 seconds for compiling gcc). Some of the "lost" time is in reading the bitcode file (~ 1 sec). When reading textual IR, its parsing actually takes almost as much time as doing the actual -O0 compilation! I think it would be useful
2009 Mar 03
2
Passing an SQL fragment in AR save
I have a basic model class TestTime with no customization. class TestTime < ActiveRecord::Base end I would like to pass the following SQL fragment as part of an AR save call to TestTime objects. How and where would I do this in the model? "set c_time=current_time" (current_time is an SQL method, not a variable). -- Posted via http://www.ruby-forum.com/.
2009 May 15
14
Grub2 on Xen PV
Hi, Let me start a new thread for this. I contacted the Grub people, and they seem more interested in creating a native Xen port of Grub than piggybacking the Mini-OS environment usin kexec as I tried. But they need some documentation on the Xen "firmware" to assess the task at least. What could be given to them apart from hvc_xen.c and xen-blkfront.c in the Linux sources?
2009 May 15
14
Grub2 on Xen PV
Hi, Let me start a new thread for this. I contacted the Grub people, and they seem more interested in creating a native Xen port of Grub than piggybacking the Mini-OS environment usin kexec as I tried. But they need some documentation on the Xen "firmware" to assess the task at least. What could be given to them apart from hvc_xen.c and xen-blkfront.c in the Linux sources?
2009 Sep 28
6
What is the most efficient way to split a table into 2 groups?
I have the following: @lot = Lot.find(params[:id]) part_nums = Part.all(:conditions => ["id <> ?", @lot.part.id]) I guess I should mention that Lot :belongs_to => :part I was looking at the log following the execution of these two statements and I saw something like this: Lot Load (0.4ms) SELECT * FROM "lots" WHERE ("lots"."id" = 13) Part
2008 Jul 22
2
ActiveRecord Associations issue
Hello all and thank you for reading this message. I am new to RoR, and ruby too, but i am quite excited about it. I am developing a RoR project and with active record associations in the following manner # Tables (all tables have only one record) CREATE TABLE `webcars_development`.`cars` ( `id` int(11) NOT NULL auto_increment, `model_id` int(11) NOT NULL default ''0'',
2007 Jul 06
2
Make #underscore reversible
Hello All, I''ve submitted a patch (http://dev.rubyonrails.org/ticket/8898) to enable #underscore to be reversible. I had trouble creating a class named "CRSContact", and it turns out that underscore and camelize are not reversible in cases where there are 3 or more capital letters. As there is a dependency between class name and file name I think it would be beneficial for
2007 Aug 15
5
Misc notes concerning view_paths
Hi all, I''ve been playing in the trunk with putting stuff in different dirs to keep files from a reusable framework separate from the app files. Here are a few considerations regarding the view_paths setting: config.view_path is used to set both action_controller.view_paths and action_mailer.template_root. We get some buggy/unexpected behavior here because
2008 Aug 24
11
link_to_function check javascript attribute
How could I check the value of an javascript object''s attribute? <div id="new_item_details" style="display:none"></div> <%= link_to_function("Show details...", nil, :id => "show_details") do |page| page.visual_effect(:toggle_blind, :new_item_details) if (page[:new_item_details].style.visibility ==
2008 Oct 08
11
Using image_tag and send_data
I am using image_tag to load an image that I''ve saved to the database (using attachment_fu if you''re curious but that''s probably not relevant here): VIEW <%= image_tag ''/photo/get_image/5'' %> CONTROLLER def get_image @photo=Photo.find(params[:id]) send_data(DbFile.find(@photo.db_file_id).data, :type =>
2007 Jul 19
2
Files copied into wrong directory
I've got to be overlooking something but when I use rsync client to copy files from one box to another it creates the folder/files in the root directory instead of what is specified in the module path statement. I have tried it via ssh and without. With user authentication on and without. I also stripped down the daemon config file to the bare minimum. Still no luck. Can somebody explain