wttech/stubway

Improve stub lookup performance

Closed this issue · 0 comments

Expected Behavior

Using stream/filter/findFirst to avoid allocating all stubs in memory.

Actual Behavior

ToStub() unnecessarily allocates all stubs. Later on only single stub is considered so further processing may be skipped.

for (Stub stub : getAllStubs(stubsResource)) {