-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Describe the bug
I have a document with ~30 i18n fields. Typing into these fields is very slow, characters appear late and the editor feels unresponsive.
To Reproduce
I made a fresh setup of the latest sanity studio and i18n plugin.
Steps to reproduce the behavior:
-
Install the latest Sanity Studio
npm create sanity@latest -
Install the latest sanity-plugin-internationalized-array
-
Configure sanity plugin:
// sanity.config.ts plugins: [ structureTool(), visionTool(), internationalizedArray({ languages: [ {id: 'en', title: 'English'}, {id: 'fr', title: 'French'}, ], defaultLanguages: ['en'], fieldTypes: ['string'], }), ],
-
Create a document schema with 30 internationalized fields:
import {defineField} from 'sanity' export default { name: 'person', title: 'Person', type: 'document', fields: [ ...new Array(30).fill(null).map((_, i) => defineField({ name: 'field_' + i, type: 'internationalizedArrayString', }), ), ], }
-
Build and start studio:
npm run build && npm start -
Open studio and start typing into field
Expected behavior
No lag while typing.
Videos
Behavior with 1 i18n field (works fine)
Screen.Recording.2025-10-14.at.16.32.06.mov
Behavior with 30 i18n field (I'm typing smoothly as before)
Screen.Recording.2025-10-14.at.16.17.42.mov
Devtools performance screenshot
I made a performance recording via devtools, it show long tasks ~0.5-1 second while typing:
Additional context
- If I create 30 i18n fields, and then keep only 1 field in the schema, it still laggy, although Sanity shows all other fields as unknown.
- A similar issue was reported before, but for older plugin version: /studio lagging when inserting data in the text field fileds #514
Which versions of Sanity are you using?
$ sanity versions
@sanity/cli (global) 4.10.3 (up to date)
@sanity/eslint-config-studio 5.0.2 (up to date)
@sanity/vision 4.10.3 (up to date)
sanity 4.10.3 (up to date)
What operating system are you using?**
OSX.
Which versions of Node.js / npm are you running?**
$ npm -v && node -v
11.5.2
v22.13.0
Reactions are currently unavailable