Skip to content

Fix admin translation set form performance and saving with 3+ constraints - #137

Open
fblupi wants to merge 1 commit into
mainio:mainfrom
Platoniq:fix/sets-page-performance
Open

fblupi wants to merge 1 commit into
mainio:mainfrom
Platoniq:fix/sets-page-performance

Conversation

@fblupi

@fblupi fblupi commented Sep 18, 2026

Copy link
Copy Markdown

Fixes #135
Fixes #136

The constraint fields partial rendered a component_model block for every space, inside every manifest, for every constraint, and hidden containers are still submitted. With ~530 spaces edit timed out, and the POST crossed Rack's 4096 parameter limit from the 4th constraint on, so sets could no longer be saved.

Now only the block for the space each constraint points at is rendered, and a space's components are loaded on demand from a new admin endpoint. Parameters per constraint go from 3 + 2K + 2M to 5 + 2K (K manifests, M spaces).

Safe because the server only reads the subject_model entry matching the selected manifest and the component_model entry matching the selected subject_id.

35 spaces, 2 constraints, on edit:

before after
form.translation-sets-form [name] 236 30
form.translation-sets-form select 114 11
Decidim::Component Load queries 109 3

With 10 constraints and 30 spaces the constraint fields stay at 70 (was ~650).

Covered by endpoint specs, edit regression specs, update specs with 10 constraints, and a js: true system spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant