TexasDigitalLibrary / Vireo

Vireo is a turnkey Electronic Thesis and Dissertation (ETD) Management System.
https://texasdigitallibrary.atlassian.net/wiki/spaces/VUG/pages/87490642/About
GNU General Public License v2.0
44 stars 33 forks source link

Issue 1842: Submission create is taking longer by processing unneeded data. #1854

Closed kaladay closed 11 months ago

kaladay commented 11 months ago

Partially resolves #1842

The Submission create takes a long time because the back end is returning the full created Submission model. The front end then processing the entire Submission model. This takes a long time.

The processed model is added to the Submission repo but then a redirect is performed on the ID. All of that just created Submission model data is lost due to the redirect. Loading and processing that data is a waste of time.

Redesign the back end to instead return an ID on create rather than the full model. Instead, return just the newly created Submission ID. On redirect, the new Submission is fully loaded anyway and so only getting the ID is not a problem.

This saves ~2000ms in my local test case.