Make sure the same GPUs don't get added again by setting the saved array to the result instead of adding to the array, or check to see if the function was already activated.
Steps to Reproduce (for bugs)
Providing your machine is slow enough, you'll be able to click the GPU tab multiple times before the GPU data is loaded, this is what causes a function to trigger multiple times.
Expected Behavior
Each GPU is added to the list of GPUs once.
Actual Behavior
GPUs can be added to the list multiple times.
Possible Solution
Make sure the same GPUs don't get added again by setting the saved array to the result instead of adding to the array, or check to see if the function was already activated.
Steps to Reproduce (for bugs)
Providing your machine is slow enough, you'll be able to click the GPU tab multiple times before the GPU data is loaded, this is what causes a function to trigger multiple times.