Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/srgchrksv/memory-profiler
Example of memory usage investigation with memory-profiler
https://github.com/srgchrksv/memory-profiler
benchmarks memory memory-management memory-profiler mprof python ram
Last synced: 4 days ago
JSON representation
Example of memory usage investigation with memory-profiler
- Host: GitHub
- URL: https://github.com/srgchrksv/memory-profiler
- Owner: srgchrksv
- Created: 2024-06-11T17:33:33.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-26T07:50:30.000Z (5 months ago)
- Last Synced: 2024-06-26T09:09:42.079Z (5 months ago)
- Topics: benchmarks, memory, memory-management, memory-profiler, mprof, python, ram
- Language: Python
- Homepage:
- Size: 177 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# memory-profiler
When processing large datasets it is important to use memory with maximum efficiency. Or you can get out of RAM, job will not be done and machine can become unresponsive.
### Example of memory usage investigation
Our task is to apply face mesh on each image from a dataset. For face mesh we will use google's mediapipe package.
*First example is creating an instance of a very complex object FaceMesh() on each iteration.*
![plots/linear.png](plots/linear.png)*Second example is creating and closes an instance of a very complex object FaceMesh() on each iteration.*
![plots/logn.png](plots/logn.png)*Third example once creates an instance of a very complex object FaceMesh() and reuses it on each iteration.*
![plots/constant.png](plots/constant.png)## To run memory profiling benchmarks
Install required packages with `pip install -r requirements.txt`Have a `./images` directory with images.
Check and run `profiling.sh`