DISSINET / InkVisitor

An open-source, browser-based front-end application for the collection of complex structured data from textual resources in history and the social sciences into a RethinkDB database for further analysis.
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Statement PUT update in editor sends whole object #2165

Closed adammertel closed 3 months ago

adammertel commented 3 months ago

The whole object is transferred to the backend while only the attributes that have changed are expected. This would not be such a problem normally, but here we are transferring the whole Response model with all the entities which is very expensive.

The problematic function is handleDataAttributeChange in StatementEditorBox component that merges changes with the tempObject which is the whole ResponseStatement received by the GET query. Then, the merged object gets into the PUT request...