On Mon, Jul 16, 2012 at 4:08 PM, Raphael Jedidiah Sofaer
<[email protected]> wrote:
> Hi Bryan,
> On Jul 16, 2012, at 10:55 AM, Bryan Larsen wrote:
>
>>> - - Create your own "table-plus" with your own helper. Just enclose a
>>> manual table with a div class="table-plus" and you'll get the looks
>>> and it'll probably much faster.
>>>
>>
>> There's a nice intermediate step here that will get you most of the
>> speed up without much of the work.
>>
>> Rather than:
>>
>> <table-plus fields="foo,bar">
>>  <foo-view:>a</foo-view:>
>>  <bar-view:>b</bar-view:>
>> </table-plus>
>>
>> Do:
>>
>> <table-plus fields="foo,bar">
>>  <tr:>
>>    <td>a</td>
>>    <td>b</td>
>>  </tr:>
>> </table-plus>
>
> This worked well.  switching out:
>
> <table-plus fields="this,stereotaxic_injections"/>
>
> For:
>
> <table-plus fields="this,stereotaxic_injections">
> <tr:>
>   <td><%=link_to this,pipette_pull_path(this)%></td>
>   <td>
>     <repeat with="&this.stereotaxic_injections">
>       <span>
>       <%= link_to this.to_s + ",", stereotaxic_injection_path(this)%>
>       </span>
>     </repeat>
>   </td>
> </tr:>
> </table-plus>
>
> Cut the render time from around 16s to 5s.  Since this is a big page with 
> hundreds of links out, I'm going to take that improvement and apply it to the 
> rest of the index pages on the site.  I also tried:
>
> <table-plus fields="this,stereotaxic_injections">
> <tr:>
>   <td><a/></td>
>   <td>
>     <repeat with="&this.stereotaxic_injections">
>       <a/>
>     </repeat>
>   </td>
> </tr:>
> </table-plus>
>
> That cut out only about 3s, leaving the render time around 13s.  So most of 
> the time is in <a/>, I think.

If you do this instead of <a/>, how much does it help?

<a href="&stereotaxic_injection_path(this)"><%= this.to_s %>,</a>

That runs <a> in "dumb mode".

thanks,
Bryan

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to