https://bugs.ruby-lang.org/https://bugs.ruby-lang.org/favicon.ico?17113305112017-07-19T21:53:32ZRuby Issue Tracking SystemRuby master - Feature #13721: [PATCH] net/imap: dedupe attr keys in Net::IMAP::FetchDatahttps://bugs.ruby-lang.org/issues/13721?journal_id=658502017-07-19T21:53:32Zshugo (Shugo Maeda)
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li><li><strong>Assignee</strong> set to <i>shugo (Shugo Maeda)</i></li></ul> Ruby master - Feature #13721: [PATCH] net/imap: dedupe attr keys in Net::IMAP::FetchDatahttps://bugs.ruby-lang.org/issues/13721?journal_id=659342017-07-26T07:51:27Zshugo (Shugo Maeda)
<ul><li><strong>Assignee</strong> changed from <i>shugo (Shugo Maeda)</i> to <i>normalperson (Eric Wong)</i></li></ul><p>normalperson (Eric Wong) wrote:</p>
<blockquote>
<p>Since attr hash keys are frequently reused, it makes sense to<br>
deduplicate them up front.</p>
<p>This saves one allocation per-attr, per-message. When running<br>
imap.fetch(1..-1, 'UID') on a mailbox with 30000 messages;<br>
this saves 30000 allocations.</p>
<p>This relies on the String#-@ change in [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: [PATCH] introduce String#fstring method (Closed)" href="https://bugs.ruby-lang.org/issues/13077">#13077</a>]</p>
<ul>
<li>net/imap: use frozen, deduplicated string in attr name (key)</li>
</ul>
<p>Trivial (1-byte change :), I may commit in a few days if no response.</p>
</blockquote>
<p>Sounds reasonable. Could you commit it on your own?</p> Ruby master - Feature #13721: [PATCH] net/imap: dedupe attr keys in Net::IMAP::FetchDatahttps://bugs.ruby-lang.org/issues/13721?journal_id=659642017-07-27T09:51:36Znormalperson (Eric Wong)normalperson@yhbt.net
<ul></ul><p><a href="mailto:shugo@ruby-lang.org" class="email">shugo@ruby-lang.org</a> wrote:</p>
<blockquote>
<p>Sounds reasonable. Could you commit it on your own?</p>
</blockquote>
<p>Thanks. But maybe we can do it across-the-board<br>
with [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: [PATCH] Hash#[]= deduplicates string keys if (and only if) fstring exists (Closed)" href="https://bugs.ruby-lang.org/issues/13725">#13725</a>] (which was reverted with <a href="https://blade.ruby-lang.org/ruby-core/82102">[ruby-core:82102]</a>)</p>
<p>I haven't had time to fix <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: [PATCH] Hash#[]= deduplicates string keys if (and only if) fstring exists (Closed)" href="https://bugs.ruby-lang.org/issues/13725">#13725</a> (sorry, having trouble focusing<br>
on coding, lately).</p> Ruby master - Feature #13721: [PATCH] net/imap: dedupe attr keys in Net::IMAP::FetchDatahttps://bugs.ruby-lang.org/issues/13721?journal_id=1003692022-12-01T03:09:03Zshugo (Shugo Maeda)
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Rejected</i></li></ul><p>Rejected because [Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: [PATCH] Hash#[]= deduplicates string keys if (and only if) fstring exists (Closed)" href="https://bugs.ruby-lang.org/issues/13725">#13725</a>] was reverted and not fixed yet.</p>