These are chat archives for ManageIQ/manageiq/performance

3rd
Jan 2017
Daniel Berger
@djberg96
Jan 03 2017 15:03
I came across something regarding mime-types I thought might be of interest
mime-types/ruby-mime-types#123
We use the mime-types gem and, apparently, it's a bit of a memory hog
Jason Frey
@Fryguy
Jan 03 2017 15:04
@djberg96 Did you see samsaffron's minimime gem?
Daniel Berger
@djberg96
Jan 03 2017 15:05
@Fryguy No, not yet.
Jason Frey
@Fryguy
Jan 03 2017 15:05
I think it's called minimime...let me find it
Daniel Berger
@djberg96
Jan 03 2017 15:05
googled, didn't come right up
Daniel Berger
@djberg96
Jan 03 2017 15:06
Haha, 20 days ago
Yep, we should look into this
Jason Frey
@Fryguy
Jan 03 2017 15:07
he also opened a discussion with rails/rails to make it the new default
can't find that discussion though
Keenan Brock
@kbrock
Jan 03 2017 15:15
yea, people have ben complaining about mime gemfor a while
they did a good job improving it a year or 2 ago but
ever since it went from 1.x to 2.x it got really bad
Jason Frey
@Fryguy
Jan 03 2017 15:16
Oh here's the discussion: mikel/mail#1059
Keenan Brock
@kbrock
Jan 03 2017 16:02
boot allocations boot retained lookup lookup uncached
mini_mime 398 62 641K/s 33K/s
mime-types 109,796 31,165 361K/s 361K/s
that seems like a pretty good improvement
Jason Frey
@Fryguy
Jan 03 2017 16:03
yeah, they did a great job...according to that thread, it's already been merged into the mail gem as well
Keenan Brock
@kbrock
Jan 03 2017 16:03
so the lookup uncached is 10x slower.
but since we only use 10(?) mime types, I can't imagine it is that bad of a hit
Jason Frey
@Fryguy
Jan 03 2017 16:04
yeah, it's the "first time" hit
Keenan Brock
@kbrock
Jan 03 2017 16:04
AND, the lookup is 2x faster
would be nice to prune the db down to 12 rows though :)
js, json, html, .... um 3?