This project is archived and is in readonly mode.
Refactoring of attributes/typecasting behavior
Reported by Eric Chapweske | October 8th, 2009 @ 07:25 AM | in 3.0.6
Decouples the attribute/typecasting implementation, introducing an Attributes:Store and ActiveRecord::Types. I think this simplifies things and lays the groundwork for other improvements. Assuming this seems like a good idea, I'd like to continue by improving the Types implementation and seeing if it makes sense to extract any other attribute/typecasting behavior.
Comments and changes to this ticket
-
josh October 15th, 2009 @ 01:28 AM
- Assigned user set to josh
- State changed from new to open
- Milestone cleared.
-
josh October 16th, 2009 @ 01:37 AM
- 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 October 17th, 2009 @ 02:21 AM
Sorry, I created that last patch without the tests. This is the complete version.
-
Repository October 17th, 2009 @ 06:37 PM
- 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 January 21st, 2010 @ 09:45 PM
- State changed from resolved to open
This is a great refactoring but it's a huge performance regression: https://gist.github.com/3b5884a2c87755f4015d
-
Repository January 21st, 2010 @ 09:52 PM
(from [6d30002a52133bd105adb29084f4cc72b1ee847f]) Revert "Refactoring attributes/types" [#3348 state:open]
This reverts commit f936a1f100e75082081e782e5cceb272885c2df7.
Conflicts:
activerecord/lib/active_record.rb activerecord/lib/active_record/base.rb
Revert "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 January 22nd, 2010 @ 01:06 AM
- Assigned user changed from josh to Pratik
-
Eric Chapweske January 25th, 2010 @ 05:20 PM
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 -
Rohit Arondekar June 17th, 2010 @ 07:36 AM
Any updates to this ticket? Eric, have you had the chance to work on a new patch?
-
Jeremy Kemper August 30th, 2010 @ 04:10 AM
- Milestone cleared.
- Importance changed from to
-
Santiago Pastorino February 27th, 2011 @ 03:15 AM
- Milestone changed from 3.0.5 to 3.0.6
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 3348 Refactoring of attributes/typecasting behavior (from [f936a1f100e75082081e782e5cceb272885c2df7]) Refacto...
- 3348 Refactoring of attributes/typecasting behavior (from [6d30002a52133bd105adb29084f4cc72b1ee847f]) Revert ...
- 3387 Decimal attributes no longer work on Rails 3.0 edge (from [6d30002a52133bd105adb29084f4cc72b1ee847f]) Revert ...