constellation
constellation copied to clipboard
Thread.sleep() called within loop
Prerequisites
- [x] Put an X between the brackets on this line if you have done all of the following:
- Running the latest version of Constellation
- Attached the Support Package via
Help
>Support Package
- Checked the FAQs: https://github.com/constellation-app/constellation/wiki/FAQ
- Checked that your issue isn't already filed: https://github.com/constellation-app/constellation/issues
- Checked that there is not already a module that provides the described functionality: https://github.com/constellation-app/constellation/wiki/Catalogue-of-Repositories
Description
Calling sleep within a loop can cause performance issues, and maybe a redesign of the classes utilizing this may be necessary. if the implementation is waiting for another thread to fill a buffer, a blocking queue could be used to free up CPU.
The following modules include usages:
- Attribute editor - top component
- Data access view
- Graph node
- Interactive Graph
- Open GL Display
- Plugin Reporter View
- Table View
- Testing
- Web server
Additional Information
These implementations may not be able to be improved on, so an individual analysis may be required on each case.
This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.
This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.
Looking into CompletableFutures might help with knowing when to proceed with an action instead of sleeping the current thread. The data access view and table view have been rewritten, so might not need this fixed on some sections.
This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.