Skip to content
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

Big Update Reduced Cpu Usage %25 to %15 #250

Closed
wants to merge 0 commits into from
Closed

Big Update Reduced Cpu Usage %25 to %15 #250

wants to merge 0 commits into from

Conversation

hasanalt
Copy link
Contributor

There İs Many Code Optimization

@martinmiglio
Copy link
Member

I am unsure of the goal of this PR, can you clarify the changes you made?

@hasanalt
Copy link
Contributor Author

its make some changes to reduce image detection cpu usage and rewrote image logging.py because instead of iterating over the files in clear_image_log and then counting them again in count_files_in_directory, you can combine the logic rewrote card_detection.py Dictionary for get_play_coords(): Instead of using multiple lists for different card groups in the get_play_coords() function, a dictionary named coords was introduced. This dictionary stores the coordinates for each card group and side. It simplifies the code and eliminates redundancy.

Copy link
Member

@martinmiglio martinmiglio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Can you update this PR to not change the comments left in the code?
  2. image_logging.py is code used for development purposes and not in production so its performance is not a concern.
  3. If the changes to image_rec.py are not intended, please remove them.
  4. I do not see how these changes will improve performance.

@hasanalt
Copy link
Contributor Author

  1. Can you update this PR to not change the comments left in the code?
  2. image_logging.py is code used for development purposes and not in production so its performance is not a concern.
  3. If the changes to image_rec.py are not intended, please remove them.
  4. I do not see how these changes will improve performance.

I actually did this update before, I just didn't upload it to github, I'll update it soon and share it again

@hasanalt hasanalt closed this May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants