Code Monkey home page Code Monkey logo

Comments (7)

henrik avatar henrik commented on June 26, 2024

Just as Google food: in our case, we (I'm on the same team as @joakimk) noticed this as Resque workers taking a long time to boot (several minutes) after upgrading from Rails 3 to Rails 4 and switching to rails-observers.

from rails-observers.

anthonyjsmith avatar anthonyjsmith commented on June 26, 2024

The list of observed models seems to grow exponentially, containing each model many times (duplicates). It is apparently solved by putting models.uniq! in Observing.observe(*models). I'll try to put a fix together...

from rails-observers.

henrik avatar henrik commented on June 26, 2024

👍

from rails-observers.

henrik avatar henrik commented on June 26, 2024

@anthonyjsmith Do you consider this issue solved? Just wondering if we can remove https://github.com/barsoom/reproduce_observer_error.

from rails-observers.

anthonyjsmith avatar anthonyjsmith commented on June 26, 2024

It's been a few years, and I'm not working with Rails any more, so my memory is a bit hazy, but yes, I consider it solved.

from rails-observers.

anthonyjsmith avatar anthonyjsmith commented on June 26, 2024

... although the pull request seems to still be open, so maybe it isn't fully solved yet...? #36

from rails-observers.

cjbottaro avatar cjbottaro commented on June 26, 2024

Definitely not resolved yet, it takes us like 20 seconds to load each constant. Stack trace is always in this code:

 0: /Users/cjbottaro/.gem/ruby/2.3.3/gems/activesupport-5.1.6/lib/active_support/core_ext/regexp.rb:7:in `match?'
 1: /Users/cjbottaro/.gem/ruby/2.3.3/gems/activerecord-5.1.6/lib/active_record/dynamic_matchers.rb:33:in `block in match'
 2: /Users/cjbottaro/.gem/ruby/2.3.3/gems/activerecord-5.1.6/lib/active_record/dynamic_matchers.rb:33:in `each'
 3: /Users/cjbottaro/.gem/ruby/2.3.3/gems/activerecord-5.1.6/lib/active_record/dynamic_matchers.rb:33:in `find'
 4: /Users/cjbottaro/.gem/ruby/2.3.3/gems/activerecord-5.1.6/lib/active_record/dynamic_matchers.rb:33:in `match'
 5: /Users/cjbottaro/.gem/ruby/2.3.3/gems/activerecord-5.1.6/lib/active_record/dynamic_matchers.rb:8:in `respond_to_missing?'
 6: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `respond_to?'
 7: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `block in observe'
 8: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `collect!'
 9: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:309:in `observe'
10: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:358:in `observed_class_inherited'
11: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:352:in `update'
12: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:147:in `block in notify_observers'
13: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:147:in `each'
14: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:147:in `notify_observers'
15: /Users/cjbottaro/.gem/ruby/2.3.3/gems/rails-observers-0.1.5/lib/rails/observers/active_model/observing.rb:199:in `inherited'

from rails-observers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.