Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off mysql2's eager-casting #1702

Merged
merged 2 commits into from
Jun 14, 2011
Merged

Turn off mysql2's eager-casting #1702

merged 2 commits into from
Jun 14, 2011

Conversation

brianmario
Copy link
Contributor

As of mysql2 0.2.8 and 0.3.3, eager-casting down in C can be disabled.

This should help performance by allowing ActiveRecord to lazily cast row values upon access (like the mysql adapter is doing). My rudimentary benchmarks show it performing about on-par with the mysql adapter, but has the added benefit of being fully thread-safe, even in Ruby 1.8 (and 1.9 obviously).

…lues later. This should help performance for tables with complex types like DATETIME, TIMESTAMP
@brianmario
Copy link
Contributor Author

Forgot to mention, the AR adapter in the 0.2.8 release has this change already so people should see similar performance gains with versions of ActiveRecord prior to 3.1

josevalim added a commit that referenced this pull request Jun 14, 2011
@josevalim josevalim merged commit 5daef25 into rails:3-1-stable Jun 14, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants