ShelbyTV / shelby_gt

Rails API services for Shelby GT
2 stars 0 forks source link

Smarter faster dbe creation #209

Closed iceberg901 closed 10 years ago

iceberg901 commented 10 years ago

@spinosa Since this is pretty fundamental shit, I'd say a code review is in order. Mongomapper doesn't let me make it as DRY as I'd like, but this should give us some very noticeable performance increases (noticeable for our dev team, not necessarily for users).

The basic change is that all of the methods that create dbes (except for the one that creates only a single one, which may be changed later) by default do not create MongoMapper models and do not return them, they just push a hash of attributes directly via the Ruby Driver. A new parameter, :return_dbe_models, can be set to true and passed to the Framer if the caller needs the models returned at the end.

spinosa commented 10 years ago

Thanks to github's new "expand" it was easier to read these diffs. But if you'd like to go over this deeper, or discuss any of the comments i made (or didn't make), let's do so IRL

iceberg901 commented 10 years ago

Feedback looks good and self explanatory. I'll make some changes and then maybe we can take a pass again together. Thanks!

I don't get whether I need to at mention you here or not, Mr Spinosa. Verify that you get a notification for me via email or GitHub notifications or whatever your preferred subscription mechanism is.