From: Bruce S. <Bru...@nc...> - 2004-05-13 00:33:36
|
Oops! I made a mistake. The 1% was with Jonathan Brandmeyer's new (but still somewhat experimental) Boost-based VPython. When I run the older Visual-2003-10-05 (the latest nonexperimental version) on a 1.4 GHz laptop, I see 40% CPU with lathe.py and 20% CPU with stonehenge.py (odd that stonehenge uses less CPU than lathe). The renderer thread does sleep, so you won't see 100% utilization. Bruce Sherwood Kuzminski, Stefan R wrote: > Hmm, Stonehenge takes ~20% of the cpu on my XP laptop. The date at the > top of __init__.py is "Visual-2003-10-05". Perhaps I will try a more > recent release. > > If that renderer thread doesn't sleep at some point in its loop, it will > consume a lot of CPU just looping, but usually that behavior is to use > 100% of the CPU. > > thanks, > S > > -----Original Message----- > From: Bruce Sherwood [mailto:Bru...@nc...] > Sent: Wednesday, May 12, 2004 5:11 PM > To: Kuzminski, Stefan R > Cc: vis...@li... > Subject: Re: [Visualpython-users] nested frames, cpu times > > That's odd. I ran lathe.py from the VPython demo suite and observed CPU > usage, which was less than 1% on a 2.6 GHz Windows XP machine. Note that > > lathe.py makes a display and then ends. Even running stonehenge.py, > which has a continuous animation and looks for user mouse inputs, runs > at less that 1%. There is a rendering thread which many times per second > > renders the scene, and it isn't "smart" -- it doesn't do any > optimization but every time clears some memory to black and repaints the > > whole scene. But this is a fast process. > > Yes, you can nest frames within frames. > > Bruce Sherwood > > Kuzminski, Stefan R wrote: > > >>My vpython app takes up 50% or so of the cpu just sitting there ( on a > > >>windows box ). I put a sleep in my top level loop, but it didn't seem > > >>to help, maybe there is a thread eating up lots of cpu within vpython? >> >>also, >> >>Can I nest frames within frames? >> >>thanks, >> >>S > > |