diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-08-10 02:54:17 -0400 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-08-11 15:03:53 -0700 |
commit | 4945d8223964d4ccb3c0a0f4107f15ae1c6c4a09 (patch) | |
tree | e283f8192ea7d4563926b91e5a430e3462999090 /actionpack/examples/views | |
parent | bef7576c09bbd51aeeb8e83b4cf24a994a0256b0 (diff) | |
download | rails-4945d8223964d4ccb3c0a0f4107f15ae1c6c4a09.tar.gz rails-4945d8223964d4ccb3c0a0f4107f15ae1c6c4a09.tar.bz2 rails-4945d8223964d4ccb3c0a0f4107f15ae1c6c4a09.zip |
Further experimentation. Was able to cut the cost of rendering 100 partials in a collection in half.
To discuss: What are the desired semantics (if any) for layouts in a collection. There are no
tests for it at present, and I'm not sure if it's needed at all.
Deprecated on this branch: `object` pointing at the current object in partials. You can still
use the partial name, or use :as to achieve the same thing. This is obviously up for discussion.
Diffstat (limited to 'actionpack/examples/views')
-rw-r--r-- | actionpack/examples/views/_hundred_partials.erb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/examples/views/_hundred_partials.erb b/actionpack/examples/views/_hundred_partials.erb new file mode 100644 index 0000000000..15e99c1b68 --- /dev/null +++ b/actionpack/examples/views/_hundred_partials.erb @@ -0,0 +1,12 @@ +<% 10.times do %> + <%= render :partial => '/hello' %> + <%= render :partial => '/hello' %> + <%= render :partial => '/hello' %> + <%= render :partial => '/hello' %> + <%= render :partial => '/hello' %> + <%= render :partial => '/hello' %> + <%= render :partial => '/hello' %> + <%= render :partial => '/hello' %> + <%= render :partial => '/hello' %> + <%= render :partial => '/hello' %> +<% end %>
\ No newline at end of file |