This project is archived and is in readonly mode.
Refactoring of attributes/typecasting behavior
-
josh
- Assigned user set to josh
- State changed from new to open
- Milestone cleared.
-
josh
- State changed from open to incomplete
This is pretty awesome!
But its not applying cleanly for me. Can you please rebase it.
I would love to eventually pull this stuff back into ActiveModel.
-
Eric Chapweske
Woops, this new one should apply.
-
Eric Chapweske
Sorry, I created that last patch without the tests. This is the complete version.
-
Repository
- State changed from incomplete to resolved
(from [f936a1f100e75082081e782e5cceb272885c2df7]) Refactoring attributes/types [#3348 state:resolved]
Signed-off-by: Joshua Peek josh@joshpeek.com
http://github.com/rails/rails/commit/f936a1f100e75082081e782e5cceb2... -
Jeremy Kemper
- State changed from resolved to open
This is a great refactoring but it's a huge performance regression: https://gist.github.com/3b5884a2c87755f4015d
-
Repository
(from [6d30002a52133bd105adb29084f4cc72b1ee847f]) Revert "Refactoring attributes/types" [#3348 state:open]
This reverts commit f936a1f100e75082081e782e5cceb272885c2df7.
Conflicts:
activerecord/lib/active_record.rb activerecord/lib/active_record/base.rbRevert "Fixed: #without_typecast should only disable typecasting on the duplicated attributes" [#3387 state:open]
This reverts commit 2831996483c6a045f1f38d8030256eb58d9771c3.
Reason :
It's not generating attribute methods properly, making object.column 5x slower. http://github.com/rails/rails/commit/6d30002a52133bd105adb29084f4cc...
-
josh
- Assigned user changed from josh to Pratik
-
Eric Chapweske
Hey guys,
What's the performance goal for this?
Current results: reading attributes is now 3x slower, though a couple methods are a fair bit faster. (query_attribute is 6x faster). The remaining performance differences are due to the longer method call path.
I'd like to explore pulling the @attributes_cache into AR::Attributes and cache most methods by default, performance is then the same or better than 2.3.
Cheers,
-Eric -
Jeremy Kemper
Eric, the goal is 2.3 speed or better.
-
Rohit Arondekar
Any updates to this ticket? Eric, have you had the chance to work on a new patch?
