Skip to content

Macros Performance - Remove redundant chain.define (?)#1207

Merged
castwide merged 1 commit into
castwide:masterfrom
lekemula:lm-macros-redundant-chain-define
Jun 1, 2026
Merged

Macros Performance - Remove redundant chain.define (?)#1207
castwide merged 1 commit into
castwide:masterfrom
lekemula:lm-macros-redundant-chain-define

Conversation

@lekemula
Copy link
Copy Markdown
Contributor

@lekemula lekemula commented Jun 1, 2026

This seems to be causing the performance issues reported #1194 (comment)

After removing these lines, specs still were passing locally, and I could not see the performance degradation as reported in the comment above.

image image

This seem to be causing the performance issues reported
castwide#1194 (comment)
Comment thread lib/solargraph/api_map.rb
next
end
end
pin = chain.define(self, closure, []).first
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@castwide do you remember the original reason this was added for?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! That was the original routine I tested for resolving method calls to pins. The newer routine at line 142 does the same thing without the expense of a chain definition. I just neglected to delete the original.

@lekemula lekemula changed the title Remove redundant chain.define (?) Macros - Remove redundant chain.define (?) Jun 1, 2026
@lekemula lekemula changed the title Macros - Remove redundant chain.define (?) Macros Performance - Remove redundant chain.define (?) Jun 1, 2026
@castwide
Copy link
Copy Markdown
Owner

castwide commented Jun 1, 2026

Thanks!

@castwide castwide merged commit 2fec52d into castwide:master Jun 1, 2026
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants