The Submission model in the UI is adding 4 or more listeners on instantiation. This causes every open browser to receive an auto-subscription for every newly created Submission. Then for every change done, the browsers receive this.
This is particularly bad when:
The current browser page has nothing related to the newly added or recently modified Submission.
Numerous Submissions are created while a given browser page is open.
Numerous already subscribed Submissions are updated while a given browser page is open.
The browser resources become excessively used and abused, slowing down the performance and response time of a browser. Reloading the page is often the only way to clean this up.
This redesigns the Submission model to move the subscription into a manually called function (enableListeners()). This enableListeners() function is then explicitly called for all cases where a Submission should be listened to.
The enableListeners() function accepts an argument called simple that when true loads a reduced set of the standard Submission listeners. This is useful for pages that only care about basic information and not detailed information. This should help reduce the burden on the browser and potentially increase performance.
A review of the list table shows that the list table already does not update dynamically. No changes are made to make the list table update dynamically.
The following are places that have been tested and should be tested:
Student Submission Page
Admin Submission Page
Student Submission Review Page.
Faculty Reviewer Submission Page.
The Manage/View Submission Page (Submission Hisory Page).
Welcome Page (should no longer have "subscription" messages in console log).
Admin Submission List Page (should no longer have "subscription" messages in console log).
The "Welcome Page" and the "Admin Submission List Page" are not expected to update on changes. The others should be reviewed to confirm that the Submission changes are updated while edited in another webbrowser page.
A Submission.disableListneers() function might be useful.
The
Submission
model in the UI is adding 4 or more listeners on instantiation. This causes every open browser to receive an auto-subscription for every newly createdSubmission
. Then for every change done, the browsers receive this.This is particularly bad when:
Submission
.Submissions
are created while a given browser page is open.Submissions
are updated while a given browser page is open.The browser resources become excessively used and abused, slowing down the performance and response time of a browser. Reloading the page is often the only way to clean this up.
This redesigns the
Submission
model to move the subscription into a manually called function (enableListeners()
). ThisenableListeners()
function is then explicitly called for all cases where aSubmission
should be listened to.The
enableListeners()
function accepts an argument calledsimple
that when true loads a reduced set of the standardSubmission
listeners. This is useful for pages that only care about basic information and not detailed information. This should help reduce the burden on the browser and potentially increase performance.A review of the list table shows that the list table already does not update dynamically. No changes are made to make the list table update dynamically.
These changes partially resolves https://github.com/TexasDigitalLibrary/Vireo/issues/1885 . The removed listener is present but when a remove is performed the page does not refresh.
The following are places that have been tested and should be tested:
The "Welcome Page" and the "Admin Submission List Page" are not expected to update on changes. The others should be reviewed to confirm that the Submission changes are updated while edited in another webbrowser page.
A
Submission.disableListneers()
function might be useful.Example addition to the submission:
Example addition to the mocks: