Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Daniel Berger
    @djberg96
    @Fryguy thanks!
    Keenan Brock
    @kbrock
    when using rbspy, anyone seen a trace like this:
    Time since start: 86s. Press Ctrl+C to stop.
    Summary of profiling data so far:
    % self  % total  name
     99.74   100.00  <c function> - unknown
      0.02     0.02  extract_record - /Users/kbrock/.gem/ruby/2.5.5/gems/activerecord-5.1.7/lib/active_record/associations/join_dependency/join_part.rb
      0.01   100.00  instrument - /Users/kbrock/.gem/ruby/2.5.5/gems/activesupport-5.1.7/lib/active_support/notifications/instrumenter.rb
      0.01   100.00  block in instantiate - /Users/kbrock/src/gems/activerecord-virtual_attributes/lib/active_record/virtual_attributes/virtual_fields.rb
      0.01   100.00  block (2 levels) in instantiate - /Users/kbrock/src/gems/activerecord-virtual_attributes/lib/active_record/virtual_attributes/virtual_fields.rb
      0.01    99.83  calculate - /Users/kbrock/src/gems/activerecord-virtual_attributes/lib/active_record/virtual_attributes/virtual_fields.rb
      0.01    99.81  perform_calculation - /Users/kbrock/.gem/ruby/2.5.5/gems/activerecord-5.1.7/lib/active_record/relation/calculations.rb
      0.01     0.04  visit - /Users/kbrock/.gem/ruby/2.5.5/gems/arel-8.0.0/lib/arel/visitors/reduce.rb
    Nick LaMuro
    @NickLaMuro
    @kbrock best to look at the generated flamegraph
    Keenan Brock
    @kbrock
    thnx
    Nick LaMuro
    @NickLaMuro
    what that is showing is just the specific function at the end of the stack that is showing up the most, not the trace
    Keenan Brock
    @kbrock
    ok, yea, flame said it was taking a long time to run a query
    but only 1k rows and it is quick from psql
    I'll reinstall the gems
    Nick LaMuro
    @NickLaMuro
    in this case, since it is a <c function> - unknown, it is probably pg and the c-ext portion of it
    click2cloud-fortnight-ninja
    @fortnight-ninja
    Hi Everyone, While starting the evm by 'bundle exec rake evm:start' I am getting
    'Base::EventCatcher' as Aborted and the workers gets increased tremendously causing the evm to run really slow. Kindly help. However the evm gets started but with around 20000 workers in which half of them are
    Base::EventCatcher : Aborted
    Capture.JPG
    Aamir Saleem
    @ProfessionalTiger
    Hi
    Can you people let me know
    how can I provision different AWS services other then EC2 and S3 using MIQ?
    Keenan Brock
    @kbrock
    Think someone here mentioned https://github.com/foraker/rspec_profiling
    I haven't had a chance to check it out, but does look nice
    article: https://www.foraker.com/blog/profiling-your-rspec-suite
    Joe Rafaniello
    @jrafanie
    @agrare I was chatting with @Fryguy about some things I'm finding looking at memory profiling of manageiq...You might want to see this -"joe" notation in ruby 2.5+ that and the String#clear discussed here: https://rubytalk.org/t/psa-string-memory-use-reduction-techniques/74477
    It looks like the -"joe" notation for deduplicating strings was added in many places for rails 6.0
    Jason Frey
    @Fryguy
    @agrare If I recall we had some sort of String pool code for VimStrings which can probably be completely replaced with the - notation
    and then String#clear could be used where we do big XMLs, remove the reference and then GC
    Joe Rafaniello
    @jrafanie
    Adam Grare
    @agrare
    hm it sounds familiar but i'm not seeing it in the broker
    Jason Frey
    @Fryguy
    I thought it was in vmware_web_service
    Adam Grare
    @agrare
    there's the VimMappingRegistry but that's different
    Jason Frey
    @Fryguy
    let me check
    Adam Grare
    @agrare
    yeah that's where I'm looking
    Jason Frey
    @Fryguy
    ohhhh...we switched to symbols
    Adam Grare
    @agrare
    maybe miqBrokerObjRegistry ?
    I don't think that's for VImStrings though
    Jason Frey
    @Fryguy
    no, we used to have things like "ManagedObjectReference" as strings
    I did a string pool for things like that ages ago, but then we changed it to symbols
    since symbols did the same task memory-wise
    even so there are still some string savings there
    like in the vimmappingregistry I think
    regardless, wanted this on your radar
    Joe Rafaniello
    @jrafanie
    Also, the strings as hash keys being automatically duped and frozen is only for Hash classes and not subclasses like VimHash
    Jason Frey
    @Fryguy
    oh good point
    Joe Rafaniello
    @jrafanie
    I wonder if this is also not true for vimhash
    ...
    In other words, there’s no benefit in writing any of the following:
    
    foo = { "key".freeze => nil } # unnecessary freeze
    foo["a".freeze] = true        # unnecessary freeze
    foo["b".freeze]               # unnecessary freeze
    They are equivalent to the following, in all versions of Ruby:
    
    foo = { "key" => nil }
    foo["a"] = true
    foo["b"]
    namely, each call to foo["a"] doesn't allocate a string for a hash class but I wonder about VimHash
    Jason Frey
    @Fryguy
    probably not
    Joe Rafaniello
    @jrafanie
    But that's a shiny object... we should profile it to see if we really should care
    Nick LaMuro
    @NickLaMuro

    @jrafanie you were one line short in your quote of that article there:

    Note: this optimization does not apply to Hash subclasses.

    Joe Rafaniello
    @jrafanie
    yeah, i should have included that, thanks
    Jason Frey
    @Fryguy
    Joe Rafaniello
    @jrafanie
    I mentioned it above but didn't quote it. Much disappiont.
    oh, I forgot about that @Fryguy, I don't remember doing that
    :laughing:
    Jason Frey
    @Fryguy
    we did a LOT of work with string allocations in that code
    Joe Rafaniello
    @jrafanie
    yeah, it's starting to come back to me
    we might get some savings by putting the frozen string literal pragma on the top of the routes.rb files but I need to measure it