Skip to content

Conversation

@jwren
Copy link
Member

@jwren jwren commented Jan 6, 2026

Replaces usages of ArrayList with com.intellij.util.SmartList in DartFileIndexData, DartRefactoringUtil, DartTestUtils, and other key classes.

SmartList is a specialized collection in the IntelliJ Platform designed to be more memory-efficient than ArrayList for lists that are frequently empty or contain only a single element. Unlike ArrayList, which allocates a backing array (default capacity 10) immediately or upon the first addition, SmartList avoids this allocation overhead for single-element lists, significantly reducing heap footprint and garbage collection pressure in hot paths.

@pq
Copy link
Collaborator

pq commented Jan 9, 2026

Add the AI-assisted label?

@jwren jwren merged commit ebe09e9 into flutter:main Jan 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants