ActionView::PartialRenderer cleanup since, we removed caching #8274

wants to merge 1 commit into


None yet
3 participants

senny commented Nov 19, 2012

With #8212 we removed the caching of ActionView::PartialRenderer. This PR is to cleanup the PartialRenderer from code added specifically because of the caching.

I performed:

  • removed assignments to of ivars to locals

senny commented Nov 19, 2012

@carlosantoniodasilva @josevalim you mentioned fragments, that were added specifically for the caching. Please let me know if there is more to update.


josevalim commented Nov 19, 2012

I don't think we should merge this. Indeed, we removed the memoization, but accessing an instance variable in a loop is still more expensive. And reducing the number of instance variable access is the main reason for the current code.

I was told once by @josevalim that these were local vars because it's faster this way than accessing ivars - since rendering partials is a hot spot, so I'm unsure about merging it.

Ha! there we go 😄


senny commented Nov 19, 2012

ah I see. Are there other fragments that were linked to the caching? Otherwise simply close the PR.

@josevalim josevalim closed this Nov 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment