PATCH speedup object creation for STI queries... Could this get in before 3.0.0final?


my app heavily depends on STI and without this patch my dashboard takes > 3000ms with the patch applies < 300ms (still too slow, I know). As i'm just adding "memoize :find_sti_class" to AR::Base I believe the patch should be safe - but maybe I'm wrong as this will reference the class constants and the class unloading in dev-mode might break?

Also I have not written a test as I'm not too sure what to test - If you come up with a clever way of testing this let me know and I'll write that test!

ticket is:

re, thies