Project

General

Profile

Actions

Misc #22000

open

Requesting to be a co-maintainer of ostruct

Misc #22000: Requesting to be a co-maintainer of ostruct

Added by Eregon (Benoit Daloze) about 19 hours ago. Updated about 18 hours ago.

Status:
Open
Assignee:
-
[ruby-core:125269]

Description

I would like to become a co-maintainer of the ostruct gem (OpenStruct class).

I know currently @marcandre (Marc-Andre Lafortune) is the maintainer of ostruct but he seems less active recently (e.g. open PRs) and I would like to become co-maintainer.

My particular interest in ostruct is that I would like to fix the performance, the current implementation calls define_singleton_method for every ostruct.foo which is extremely inefficient for all Ruby implementations and all JITs.
This has led to basically deprecating OpenStruct in its documentation and in some RuboCop rules.
However a much faster and simpler implementation would be to rely on method_missing which I have explored in the past.
This speeds up reading OpenStruct attributes by 6.6x to 2096x.

There are compatibility concern so this requires evaluating carefully what OpenStruct subclasses do and
might require bumping the major version.

I would love to get @marcandre (Marc-Andre Lafortune) 's opinion on this request but I'm not sure when he will see this.

Updated by marcandre (Marc-Andre Lafortune) about 18 hours ago Actions #1 [ruby-core:125273]

Eregon (Benoit Daloze) wrote:

There are compatibility concern so this requires evaluating carefully what OpenStruct subclasses do and
might require bumping the major version.

Agreed it would require bumping a major version. Ideally this would encompass all existing requests (e.g. include? #74) that affect compatibility too.

I would love to get @marcandre (Marc-Andre Lafortune) 's opinion on this request but I'm not sure when he will see this.

I'm in favor 👍

Actions

Also available in: PDF Atom