Comments (3)
Here is the screenshot of CPU usage:
Steps to produce issue:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python trimesh_windowed_scene_viewer.py
from trimesh.
Hey, you could try running with profiling pip install pyinstrument
and scene.show(profile=True)
. Although it is a debug viewer and is not massively optimized (and also due for a Pyglet 2 re-write one of these days). Yeah it's probably mostly that the framerate is way higher than it needs to be, maybe we could do something like this locked to the monitor refresh rate:
https://stackoverflow.com/questions/62824594/how-to-limit-fps-in-pyglet-window-on-draw-event
from trimesh.
Thanks mikedh for the suggestions,.
I used scene.show(profile=True) and I got following output:
_ ._ __/__ _ _ _ _ _/_ Recorded: 10:00:02 Samples: 3462
/_//_/// /_\ / //_// / //_'/ // Duration: 8.054 CPU time: 31.638
/ _/ v4.6.2
Program: pyinstrument trimesh_scene_viewer.py
8.053 <module> trimesh_scene_viewer.py:1
├─ 7.437 Scene.show trimesh/scene/scene.py:1255
│ [38 frames hidden] trimesh, pyglet, <built-in>, numpy, p...
│ 4.388 select <built-in>
├─ 0.338 <module> yourdfpy/__init__.py:1
│ [10 frames hidden] yourdfpy, trimesh, scipy
└─ 0.277 load yourdfpy/urdf.py:931
[19 frames hidden] yourdfpy, trimesh
I tried other solution, but still the CPU usage is really high.
I guess, in future when Pyglet stable version 2.x.x is released then maybe new functionalities could be useful.
from trimesh.
Related Issues (20)
- [Beginner Question] Is there a way to check if a given vertex is manifold or not in trimesh ? HOT 2
- `EXCEPTION_ACCESS_VIOLATION` error when using `CollisionManager` integrated within Blender 4.0.0 Alpha environment HOT 1
- how to deal with "emission.jpg" and "normal.jpg" using trimesh
- Obtaining the area of a mesh section HOT 5
- NumPy 2.0 compatibility HOT 14
- Loading GLB (GLTF) faces index out of bounds error HOT 2
- Collision Detection Inaccuracy
- In the slicing algorythm loops are in some edge case not correctly detected
- Pass resolver to _read_buffers() when loading a .GLB file
- Add new vertices to the mesh HOT 1
- Projected area discrepency question HOT 1
- I can use it to export the model normally, and other displays are also normal. However, when I put the model in the WeChat mini program, an error occurred. How can I set it when exporting the model to avoid this problem
- Converting GLTF vertex color to RGBA on load attempts to modify non-writable buffer HOT 1
- Trimesh fails to load mesh texture for a large mesh HOT 3
- Intersecting volumes as mesh cannot always be split when vertices overlap HOT 1
- `tests/test_gltf.py::GLTFTest::test_vertex_colors_import` fails with NumPy 2.0.0rc2
- AttributeError: 'list' object has no attribute 'area_faces' HOT 1
- Rtree error in "Index_CreateWithStream": Tools::TemporaryFile: Cannot create temporary file name. HOT 2
- Mesh Export Size Difference (Local/Remote) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trimesh.