https://dev.arvados.org/https://dev.arvados.org/favicon.ico?15576888422015-01-28T18:50:05ZArvadosArvados - Bug #5096: [Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.https://dev.arvados.org/issues/5096?journal_id=205622015-01-28T18:50:05ZTom Cleggtom@curii.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/20562/diff?detail_id=19632">diff</a>)</li><li><strong>Category</strong> set to <i>Workbench</i></li></ul> Arvados - Bug #5096: [Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.https://dev.arvados.org/issues/5096?journal_id=206642015-01-29T15:21:26ZTom Cleggtom@curii.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/20664/diff?detail_id=19735">diff</a>)</li><li><strong>Story points</strong> changed from <i>1.0</i> to <i>0.5</i></li></ul> Arvados - Bug #5096: [Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.https://dev.arvados.org/issues/5096?journal_id=207332015-01-29T20:16:56ZRadhika Chippadaradhika@curoverse.com
<ul><li><strong>Assigned To</strong> set to <i>Radhika Chippada</i></li></ul> Arvados - Bug #5096: [Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.https://dev.arvados.org/issues/5096?journal_id=211902015-02-15T21:03:00ZRadhika Chippadaradhika@curoverse.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul> Arvados - Bug #5096: [Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.https://dev.arvados.org/issues/5096?journal_id=212212015-02-16T17:23:30ZBrett Smithbrett.smith@curii.com
<ul></ul><p>Reviewing <a class="changeset" title="5096: if only collection name or description is being updated, do not include manifest_text in th..." href="https://dev.arvados.org/projects/arvados/repository/arvados/revisions/23c1bc62ea3644636c0edce8ccee39f2094db190">23c1bc6</a></p>
<p>When we're doing small updates, the new update method skips a lot of the encoding work in the ApplicationController's implementation, and then repeats a lot of the rendering code. I think we could help future-proof this by repeating as little as possible, and calling super as early as possible. I think you could do it like this:<br /> <pre><code class="ruby syntaxhl"> <span class="k">def</span> <span class="nf">update</span>
<span class="vi">@updates</span> <span class="o">||=</span> <span class="n">params</span><span class="p">[</span><span class="vi">@object</span><span class="p">.</span><span class="nf">resource_param_name</span><span class="p">.</span><span class="nf">to_sym</span><span class="p">]</span>
<span class="k">if</span> <span class="vi">@updates</span> <span class="o">&&</span> <span class="p">(</span><span class="vi">@updates</span><span class="p">.</span><span class="nf">keys</span> <span class="o">-</span> <span class="p">[</span><span class="s2">"name"</span><span class="p">,</span> <span class="s2">"description"</span><span class="p">]).</span><span class="nf">empty?</span>
<span class="c1"># exclude manifest_text since only name or description is being updated</span>
<span class="vi">@object</span><span class="p">.</span><span class="nf">manifest_text</span> <span class="o">=</span> <span class="kp">nil</span>
<span class="k">end</span>
<span class="k">super</span>
<span class="k">end</span>
</code></pre></p>
<p>Let me know what you think of that. Thanks.</p> Arvados - Bug #5096: [Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.https://dev.arvados.org/issues/5096?journal_id=212252015-02-16T17:54:25ZRadhika Chippadaradhika@curoverse.com
<ul></ul><p>Brett, thanks for the suggestion. This is much more efficient and accomplishes the goal more effectively. I made this update.</p> Arvados - Bug #5096: [Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.https://dev.arvados.org/issues/5096?journal_id=213932015-02-18T20:13:29ZWard Vandewegeward@curii.com
<ul><li><strong>Target version</strong> changed from <i>2015-02-18 sprint</i> to <i>2015-03-11 sprint</i></li></ul> Arvados - Bug #5096: [Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.https://dev.arvados.org/issues/5096?journal_id=222452015-03-11T19:16:16ZWard Vandewegeward@curii.com
<ul><li><strong>Target version</strong> changed from <i>2015-03-11 sprint</i> to <i>2015-04-01 sprint</i></li></ul> Arvados - Bug #5096: [Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.https://dev.arvados.org/issues/5096?journal_id=230842015-04-01T19:06:02ZWard Vandewegeward@curii.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li></ul>