Hi, I just wandering. If I autoload 3000 Ruby on Rails classes, will it need more computer memory? is more rails classes loaded, more memory needed? will it cause performances problems? Thanks, John -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi John, More classes and instances will use more memory. Many websites uses Rails with these 3000+ classes in production, so that''s not really a problem. What exactly is your question? You can disable parts of the Rails framework in your environment.rb, but that won''t make a big difference. On 30 mrt, 23:25, John John <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi, > > I just wandering. If I autoload 3000 Ruby on Rails classes, will it need > more computer memory? is more rails classes loaded, more memory needed? > will it cause performances problems? > > Thanks, > John > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
pl wrote:> Hi John, > > More classes and instances will use more memory. Many websites uses > Rails with these 3000+ classes in production, so that''s not really a > problem. > > What exactly is your question? You can disable parts of the Rails > framework in your environment.rb, but that won''t make a big > difference.Hi Pl, Great to know many website use more than 3000+ classes. Basically, 1. I will have huge numbers of tables and each one of them have totally different columns. This because I want user to be able to upload theirs own data/tables. So, in this case, it can be even 20000+ classes. 2. For each tables, I will have model class that will access that table. 3. By having these no 1 and 2 requirement, I will need to load "model classes" dynamically whenever a user import their own table without restarting rails. So that''s why I am looking into autoload feature. But seems like autoload only loading it from file. It will not load based on "string that contain model class" -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You may really want to look at a NoSQL option, like MongoDB. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
E. Litwin wrote:> You may really want to look at a NoSQL option, like MongoDB.Yes, I indeed using NoSQL. Even with NoSQL, you still need Model Class to save and retrieve data. :). -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
John John wrote:> E. Litwin wrote: >> You may really want to look at a NoSQL option, like MongoDB. > > Yes, I indeed using NoSQL. Even with NoSQL, you still need Model Class > to save and retrieve data. :).oh yeah, I think I found the solution of using Object::const_set -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
The next question is.
---------- is it possible to convert this -----
Object::const_set(name.intern, Class::new do
def write
puts "TEST"
end
end
)
--------- convert above to -----------------
string_test = '' def write
puts "TEST"
end''
Object::const_set(name.intern, Class::new do
string_test
end
)
-------- is that possible?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
no need to answer find the answer using eval -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.