Skip to content

Conversation

cwangg897
Copy link

Replaced linear List#indexOf with a precomputed Map-based index lookup This reduces the time complexity from O(n) to O(1), improving performance for field lookups in wide CSV files. This change preserves existing behavior and error messages

Resolves: #4930

@cwangg897 cwangg897 force-pushed the perf/fieldset-indexof-optimization branch from c5505ca to 44b758e Compare July 27, 2025 11:11
Replaced linear List#indexOf with a precomputed Map-based index lookup
This reduces the time complexity from O(n) to O(1), improving performance
for field lookups in wide CSV files. This change preserves existing
behavior and error messages

Resolves: spring-projects#4930

Signed-off-by: Choi Wang Gyu <[email protected]>
@cwangg897 cwangg897 force-pushed the perf/fieldset-indexof-optimization branch from 44b758e to 4e2f14b Compare July 27, 2025 11:14
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.

Performance improvement: Optimize DefaultFieldSet.indexOf() method
1 participant