-
Notifications
You must be signed in to change notification settings - Fork 22k
[Proposal] Schema cache dump #5162
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
Conversation
I like this idea, but can we change a few things? First, can we just implement schema_cache.connection.tables.each do |table|
schema_cache.populate(table)
end Maybe not a I have another idea that is related to this: can we enable schema caching by default? We can use the migration version to determine if the cache should be expired. Maybe add a Anyway, I really like this feature. |
Thank you for comment ! I'll improve the implement :) |
Hi @tenderlove Done! |
[Proposal] Schema cache dump
Can you provide some benchmarks for this optimization? How much does it actually speed things up? |
I'll provide it, but I've many works during this week. Please, just wait a moment a few days. |
Sorry for keeping you waiting for this reply. I tested about this performance. ・building environment steps In my experience on Oracle, the queries to data dictionary were very slow when having many data. I'll try to research a little more. |
In my experience, if we had many models (ex. one hundred), Rails boot was slowly.
According to production log, it seems that AR's schema data loading is slowly especially.
Thus I've implemented
schema cache dumping
. Please review it.I guess this implementation has many fixing point ;)
Usage: