These are chat archives for ManageIQ/manageiq/performance

9th
Mar 2016
Keenan Brock
@kbrock
Mar 09 2016 16:30
Wish AR::::Preloader.preload(base, :rels) returned base and not base.flat_map {|x| x.rels.to_a } - more work and I don't know who would be able to use that.
Does seem useful, but every use case I come up with seems to want base
Jason Frey
@Fryguy
Mar 09 2016 16:31
we use MiqPreloader.preload anyway
So, can you just change the return value there?
Keenan Brock
@kbrock
Mar 09 2016 16:32
did cross my mind
Keenan Brock
@kbrock
Mar 09 2016 16:38
@Fryguy fun. preloader/association.rb reminds me of some of the work you did with save_inventory_helper and indexing by keys, key conversion
Jason Frey
@Fryguy
Mar 09 2016 16:39
oh yeah
Keenan Brock
@kbrock
Mar 09 2016 16:41
dangerous knowledge. do not use:
to populate ems.vms with vm_list, all you have to do is:
ems.vms.tap {|a| a.loaded! ; a.targets.concat(vm_list) }
I had thought it was much more complicated than that. rails sure has improved this