-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance the contracts list by removing the duplicate requests, and reduce the time limit when loading the contracts by removing the onMounted
lifecycle
#2872
Conversation
- Removed the 'onMount' from the 'onMounted' life cycle since it not needed because we call the 'loadContracts' function on each change happens on the table. - Fix the contracts table takes too much time to load.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, would be nice though if we can make only one request for the same node used by multiple contracts instead of for example requesting node 11 here twice
What do you think @AhmedHanafy725 ?
…ntracts_list_page
changing table options still takes so much time to load, is there anyway to enhance it ? like client side pagination, for example ? |
- Replaced the static values with 'ref' concept to change the value when needed. - Cached the nodes to use it when re-request to avoid the duplicated requests. - Enhanced the list time by using the ''Promise.all and display what gets finished. - Introduced a new hint alert to inform the user that the table will be reloaded in a bit. - Replaced the 'update-options' event with the 'update-page' and 'update-size' events to avoid requesting on each change happens on the table and only request when changing the page/size. - Created only one function to request to list the contracts based on it's type. - Returned back the 'onMounted' life cycle and called the 'loadContracts' inside it. - Remove the duplicate requests. - Updated the 'getNodeInfo' function to request only the nodes that are not cached.
Good job |
…tracts` this is necessary now after changes in #2872
Description
Enhance the contracts list by removing the duplicate requests, and reduce the time limit when loading the contracts by removing the
onMounted
lifecycleChanges
Related Issues
Screenshots/Video
Screencast.from.06-04-2024.06.46.01.PM.webm
Checklist