Project

General

Profile

Actions

Feature #13721

closed

[PATCH] net/imap: dedupe attr keys in Net::IMAP::FetchData

Added by normalperson (Eric Wong) over 7 years ago. Updated almost 2 years ago.

Status:
Rejected
Target version:
-
[ruby-core:81926]

Description

Since attr hash keys are frequently reused, it makes sense to
deduplicate them up front.

This saves one allocation per-attr, per-message. When running
imap.fetch(1..-1, 'UID') on a mailbox with 30000 messages;
this saves 30000 allocations.

This relies on the String#-@ change in [Feature #13077]

  • net/imap: use frozen, deduplicated string in attr name (key)

Trivial (1-byte change :), I may commit in a few days if no response.


Files

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0