Virtualized Picker recalculates its layout several times for each visible option when it opens
Los mantenedores suelen responder en 1 día
@mangeshraut712 ya está trabajando en esto.
Desde el 27/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
- Área
- frontend, performance
Línea de trabajo
Start by reading useVirtualizerItem and tracing its calls to isElementVisible() and getSize(); reproduce the Picker opening with the linked demo and inspect the Chrome Performance recording. The issue describes measuring visible options in a shared pass. Done looks like one layout measurement pass for the visible options and fewer repeated style recalculations and layouts.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Provide a general summary of the issue here
When a Picker opens, the browser works out the page's styles and layout several times for each visible option before the list can be drawn, because useVirtualizerItem measures each option separately.
🤔 Expected Behavior?
Opening the Picker should work out the layout once for all the visible options, not repeatedly for each one.
😯 Current Behavior
useVirtualizerItem measures each visible option in its own layout effect. For each one, isElementVisible() calls checkVisibility(), then getSize() clears node.style.height, reads scrollWidth and scrollHeight, and then sets the height value back again. Because each option changes a style and then reads a size, the browser works out the styles and layout again, several times for every option.
In a Chrome developer tools Performance panel recording of it opening, rendering 17 visible options took 133 layouts and about 150 style recalculations. With the CPU slowed down 4x in Chrome 155, the Picker took 227ms to open, and the page became unresponsive for 162ms of that time. It takes about the same time with 125 items as with 250, so it isn't the number of items that's the problem.
💁 Possible Solution
Measure the visible options in one pass. Clear the heights of all the options that need measuring first, then read all their sizes, then put the
heights back, so the browser only works out the layout once.
🔦 Context
I was measuring how quickly some different design systems open a country selector, with the CPU slowed down 4x to roughly match a mid-range phone. React Spectrum's Picker uses virtualization, so I expected it to be one of the fastest, but it was the second slowest to open, and the page was unresponsive for 162ms of the time it took to open up.
On lower-end devices, that pause comes straight after the user clicks the Picker, so it makes the whole app feel slow to respond. Since the issue doesn't depend on the number of items, it affects every Picker, not just ones with long lists, and a fix in seVirtualizerItem would help any app that uses it.
🖥️ Steps to Reproduce
- Clone the reproduction repo I made here: https://github.com/denodell/react-spectrum-picker-open-repro
- Run
npm install, thennpm start, and open the page it serves. - In the Performance panel of Chrome's developer tools, set CPU throttling to 4x and press Record.
- Click the Picker to open it, then stop the recording.
- The main thread shows a long run of short Recalculate style and Layout events, and in the "Bottom-Up" tab, notice that
checkVisibilityis near the top, called fromisElementVisibleinuseVirtualizerItem.
Version
@adobe/react-spectrum 3.47.6, react-aria 3.53.0, React 19.3.0
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS Golden Gate
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 16k
- Forks
- 1.6k
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 41
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de adobe/react-spectrum
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 88/100
adobe/react-spectrum#10909 ·
Los mantenedores suelen responder en 1 día
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValuePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
adobe/react-spectrum#10900 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Separator adds a redundant role="separator" to its default <hr>Posiblemente ocupada @Janani-bn la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
adobe/react-spectrum#10894 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is openPosiblemente ocupada @mangeshraut712 la tomó hace 7 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
adobe/react-spectrum#10866 ·
Los mantenedores suelen responder en 1 día
-
CheckboxGroup: `validationBehavior="aria"` is ignored by its checkboxes since 1.18Posiblemente ocupada @mangeshraut712 la tomó hace 7 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
adobe/react-spectrum#10856 ·
Los mantenedores suelen responder en 1 día
Todos los issues de adobe/react-spectrum
Issues similares
-
area: frontend priority: normal
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
formbricks/formbricks#9918 ·
Los mantenedores suelen responder en 1 día
-
Chat: Resize question overlayAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
thecodacus/pithagoras#364 ·
Los mantenedores suelen responder en 1 día
-
TestAutonomousStop_ReportsObservedState fails under host load: 1s wall-clock ceiling vs 250ms cycleAbiertotype:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nightgauge/nightgauge#2909 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día