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

Extremely high cpu usage on Python 3.10 causing lag and slowness #113

Open
aoslamda opened this issue Oct 10, 2023 · 2 comments
Open

Extremely high cpu usage on Python 3.10 causing lag and slowness #113

aoslamda opened this issue Oct 10, 2023 · 2 comments

Comments

@aoslamda
Copy link

Created a minimal working example of Tkintermapview on Python 3.10 and cpu usage skyrockets to 310%. I compared this to the same working example on Python 3.8 and cpu usage is fine at 60%.

@Jarauvi
Copy link

Jarauvi commented Oct 24, 2023

I reduced image_load_thread_pool size from initial value 25 to 4. CPU load was halved and tiles were loaded in about 4 seconds while by default loading time was almost 13 seconds.

Here are the logged processing times of individual threads from the moment image_load_queue_tasks is populated to the moment the queue is empty again:

25 threads:
done in 9.337615
done in 9.554295
done in 10.7789
done in 11.088345
done in 11.147088
done in 11.160177
done in 11.424975
done in 11.437656
done in 11.494931
done in 11.634528
done in 11.684579
done in 11.650118
done in 11.743283
done in 11.831032
done in 11.905858
done in 12.078805
done in 12.490917
done in 12.666273
done in 12.724669
done in 12.775328
done in 12.816464
done in 12.858942
done in 12.817465
done in 12.882834

4 threads:
done in 3.73019
done in 3.759539
done in 3.858024
done in 3.881888

@FedoB
Copy link

FedoB commented Mar 7, 2024

Is the above solution valid?

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

No branches or pull requests

3 participants