-
-
Notifications
You must be signed in to change notification settings - Fork 939
Description
Instance variables are cached and invalidated by the identity of the nearest concrete class. This works for simple cases, but when the concrete class has been dup'ed from another, even if it does not add any new instance variables, it will cause ivar caches to invalidated.
It appears that ActiveRecord's scope feature uses a lot of dup'ed classes with their own instance variables, preventing any caching. It's unclear whether the dup'ed classes go on to define their own instance vars, but see #155 for evidence that they definitely do not cache properly.
This should be investigated for 1.7. It does not represent a critical issue since we have cached this way for years, but we will have degraded perf until it is improved. Fixing #155 (which I consider critical) will mitigate some of this bug's effects.