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

High rate of accessing a background file #289

Closed
sanyer opened this issue Jul 13, 2023 · 4 comments · Fixed by #334
Closed

High rate of accessing a background file #289

sanyer opened this issue Jul 13, 2023 · 4 comments · Fixed by #334
Labels
bug Something isn't working

Comments

@sanyer
Copy link

sanyer commented Jul 13, 2023

Describe the bug
Process Monitor shows that this process is accessing background image a lot.
I'm actually not sure that it is accessing the disk each time as the System Informer shows that Disk I/O is just couple of KBs (presumably the size of the image)

To Reproduce
Steps to reproduce the behavior:

  1. Run software
  2. Check System Informer for the high I/O rate
  3. Check Process Monitor for the fact of accessing background file

Expected behavior
Not accessing the file dozens of times per second.

Screenshots / photos of the Turing screen
image

Environment:

  • Turing 3.5”
  • 3.0.0
  • Windows 11
  • Python 3.10
  • AMD 5800X3D, NVIDIA GeForce RTX 3070

Additional context
Add any other context about the problem here.

@sanyer sanyer added the bug Something isn't working label Jul 13, 2023
@mathoudebine
Copy link
Owner

Hello! Thanks for raising this issue, I agree this behavior is not optimal. It would be better to load the picture only once in memory for the lifetime of the program.
Some themes use different background pictures depending on the elements to display e.g. https://github.com/mathoudebine/turing-smart-screen-python/blob/main/res/themes/Landscape6Grid/theme.yaml uses background.png and background_empty_dark.png. This should be taken into account when fixing this bug

@sanyer
Copy link
Author

sanyer commented Aug 19, 2023

@mathoudebine yeah, I'm using theme Cyberpunk and also see file generale-mono/GeneraleMonoA.ttf being accessed around 100 times per second:
image

@mathoudebine
Copy link
Owner

Hi @sanyer
The issue should be fixed in the latest commits on main branch

@sanyer
Copy link
Author

sanyer commented Sep 24, 2023

Hi @sanyer

The issue should be fixed in the latest commits on main branch

I will try to take a look tomorrow. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants