constellation icon indicating copy to clipboard operation
constellation copied to clipboard

Thread.sleep() called within loop

Open aldebaran30701 opened this issue 4 years ago • 5 comments

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.

aldebaran30701 avatar Jul 09 '20 04:07 aldebaran30701

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar Apr 24 '21 01:04 github-actions[bot]

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar Jan 10 '22 01:01 github-actions[bot]

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.

aldebaran30701 avatar Mar 17 '22 03:03 aldebaran30701

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] avatar Dec 12 '23 00:12 github-actions[bot]