realpython / python-guide

Python best practices guidebook, written for humans.
https://docs.python-guide.org
Other
28.35k stars 5.83k forks source link

Would a section on performance be of interest? #1110

Open Anders-E opened 2 years ago

Anders-E commented 2 years ago

I feel like a section on common performance pitfalls in Python could be highly useful, not only to new Python programmers but also as a reference for intermediate programmers and up.

Potentially such a section could also include tips on how to profile and/or benchmark Python code.

Would this fit within the scope of this guide?

sanjomathew09 commented 2 weeks ago

Video Playback Performance: Loading and playing videos efficiently, especially if they are being streamed from a remote location like Firebase, requires attention to buffer management, resolution, and network latency.

  1. File Upload Performance: Uploading large media files to Firebase can be time-consuming. Discussing strategies such as background uploads, upload progress monitoring, and retries for failed uploads could improve user experience.

  2. Mobile App Optimization: Kivy apps on mobile platforms might suffer from performance issues like high memory consumption, slow UI rendering, or battery drain. A section on optimizing the app for different platforms (Android, iOS) could be crucial, especially with respect to file handling, threading, and hardware utilization.

  3. Firebase Efficiency: Ensuring Firebase interactions (such as file uploads, authentication) are handled asynchronously and optimized to avoid unnecessary network requests is essential for a smooth user experience.

  4. General App Responsiveness: Detailing methods for keeping the UI responsive during long-running operations (e.g., using multithreading, coroutines, or background services) would interest developers aiming for high-performance applications.