Re: [Rails-core] Increase performance

2016-05-06 Thread Allen Madsen
I believe what Xavier means is that you need to demonstrate at the places where you would do the replacement that the speed up is worth the readability cost. If on a single request, that code executes once, it's probably not noticeable. That's why in the benchmark you need to run it 100 million

Re: [Rails-core] Significant change should be better explained in the Changelog regarding non ERB view partials

2016-05-06 Thread Rafael Mendonça França
That makes sense. Thank you for pointing out. Do you have a suggestion how to improve it? Could you open a pull request? On sex, 6 de mai de 2016 at 06:46 Rodrigo Rosenfeld Rosas < rr.ro...@gmail.com> wrote: > Here is the relevant section in the changelog, I think: > >

Re: [Rails-core] Increase speed creating new array

2016-05-06 Thread Andrey Molchanov
Thanks for your feedback. Yes, I will need find places where args passes to Array() is not kind of Array class. пятница, 6 мая 2016 г., 1:02:26 UTC+3 пользователь Ufuk Kayserilioglu написал: > > Andrey, > > Be careful with this because the sematics of the two are not exactly equal: > > [1]

Re: [Rails-core] Increase performance

2016-05-06 Thread Andrey Molchanov
Thanks for your feedback. I agree with you about use idioms for better readable code. Its cool, but Rails has many places where this not use. A lot of code can be corrected according to this, but this is not done. And I thought, why not use it in favor of speed? That is what I was based when

[Rails-core] Significant change should be better explained in the Changelog regarding non ERB view partials

2016-05-06 Thread Rodrigo Rosenfeld Rosas
Here is the relevant section in the changelog, I think: https://github.com/rails/rails/blob/v5.0.0.beta4/actionview/CHANGELOG.md "Change the default template handler from ERB to Raw. Files without a template handler in their extension will be rendered using the raw handler instead of ERB.

Re: [Rails-core] Increase performance

2016-05-06 Thread Xavier Noria
In general, the Rails code base wants to use Ruby idiomatically. loop is the most succinct idiom in Ruby for those kinds of loops, see for example: https://github .com/rails/rails/blob/254f57ca3668398a5fcfd4f63be5d91c4c3b1cd4/actioncable /lib/action_cable/connection/stream_event_loop.rb#L66