News for hackers. Stuff that matters.
Re:Ask HN: What do you want to see in Rails 4.1? by gary4gar on Sunday August 11, 2013 @03:25PM (#6195928)
* Improved migration format: make it possible to create new initial migrations as a project evolves by rebasing. Meaning there's no need to keep or execute the whole migration history every time. On my current project running migrations from starch takes 30mins :(

* Improvement in performance in regarding to JSON generation or other thing is always welcome. following benchmarks can be taken as reference where rails stands currently. Any improvement in the above stats would be awesome http://www.techempower.com/benchmarks/#section=data-r6

Re:Ask HN: What do you want to see in Rails 4.1? by jordanthoms on Sunday August 11, 2013 @03:31PM (#6195958)
Shouldn't you be using schema:load or structure:load rather than running your migrations from scratch? Migrations are for a database which already has data.
Re:Ask HN: What do you want to see in Rails 4.1? by jph on Sunday August 11, 2013 @03:38PM (#6196002)
+1 for this. My team "rolls up" migrations akin to spring cleaning, because the migration files often have more important information that the db schema, and are easier for team members to learn quickly. I'll contribute $50 if this feature is accepted for Rails 4.1.
Re:Ask HN: What do you want to see in Rails 4.1? by steveklabnik on Sunday August 11, 2013 @03:42PM (#6196018)
> I'll contribute $50 if this feature is accepted for Rails 4.1.

Oh yeah? I wonder if others would also pay for bug bounties.

Re:Ask HN: What do you want to see in Rails 4.1? by codeodor on Sunday August 11, 2013 @03:58PM (#6196097)
I came across https://www.bountysource.com/ the other day.
Re:Ask HN: What do you want to see in Rails 4.1? by steveklabnik on Sunday August 11, 2013 @03:30PM (#6195956)
I have seen people sorta 'merge up' migrations at a point in time...

As for JSON generation, there's an open ticket for it already: https://github.com/rails/rails/issues/9212

Re:Ask HN: What do you want to see in Rails 4.1? by cheald on Sunday August 11, 2013 @03:37PM (#6195995)
The oj gem helps json generation a ton. The circular reference checks are still slow though.
Re:Ask HN: What do you want to see in Rails 4.1? by phamilton on Sunday August 11, 2013 @05:02PM (#6196320)
In my tests, serialization to a hash before oj writes it out to json is the slowest part. Doing 1000 records (~30 entries each, some with nested entries) to json via OJ and as_json results in less than 20% spent in OJ and the other 80% in generating the hash.