Closed kaladay closed 1 month ago
I tested a couple things, i was mainly looking for other things it might have broken. I did notice that if am signed in on one browser and again under same acct using different browser (brave and firefox) my filter changes on one reflect on the other so some subscriptions are still working as expected.
I am confused about your branch though - your TAMUlib code is building 4.2.6 rather than 4.2.7 based on a 4 month old pom.xml rather than TDL's 3 week old pom.xml.
I am confused about your branch though - your TAMUlib code is building 4.2.6 rather than 4.2.7 based on a 4 month old pom.xml rather than TDL's 3 week old pom.xml.
This has been corrected.
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.
Notes for Future Work
A
Submission.disableListneers()
function might be useful.Example addition to the submission:
Example addition to the mocks: