OpenFeign / OpenFeign/feign

Improve reflection-related performance

Open
#945 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

proposal waiting for votes
Dominant language
Java
Stars
9.8k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
41

Description

Hi there,

as far as I can see, feign uses reflection at runtime. As all of us know, reflection is "expensive"[1]. Though as far as I can see, feign is not using reflection a lot.

Feature request: Improve reflection-related performance

Possible solutions

I got two suggestions which could help improve the performance.

Solution 1: Use another reflection-library, like reflectasm

Solution 2: Do Ahead-of-time compilation using BCEL or ASM. Lombok is using ASM, for example. micronaut-inject-java is another example for AoT compilation.

[1] Some Java reflection example benchmarks at:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No Feign files, tests, or entry points are identified in the issue. Start by locating and profiling Feign's runtime reflection usage, then compare the proposed reflectasm and ahead-of-time BCEL/ASM approaches. Done requires an agreed approach and evidence that reflection-related performance improves.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.