dj_lib.py
-
- Confed Special Operative
- Posts: 291
- Joined: Sat Jan 28, 2006 2:58 am
- Location: Des Moines, Iowa
dj_lib.py
Well, since we are getting close to sending out a new version, the one last thing that causes a huge drop in framerate is the python script dj_lib.py. Every time I see it activate, changing the music routine from peace to hostile, or whatever. My framerate drops from (35-45) to around 4 for three or so seconds. Major bad performance with this. Anybody else have the same experience?
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
The music library loads the entire song to uncompressed memory in a separate thread. That might contribute if decoding is complicated.
Then, the main thread sends it over to OpenAL, which could possibly cause missed frames since memory copying isn't free.
While I have noticed a delay between switching songs, I haven't specifically noticed a corresponding framerate drop.
Then, the main thread sends it over to OpenAL, which could possibly cause missed frames since memory copying isn't free.
While I have noticed a delay between switching songs, I haven't specifically noticed a corresponding framerate drop.
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
A frame drop may be associated with a low-memory system. And low is anything below 1G, bTW. VS uses a lot of memory normally, and when it started loading entire music tracks it started eating up a lot more. When you run out of physical memory, it goes to swap, and that stalls the entire process AFAIK (threads don't proceed, they also sleep while a page fault is being served).
-
- Confed Special Operative
- Posts: 291
- Joined: Sat Jan 28, 2006 2:58 am
- Location: Des Moines, Iowa
I have 1.25 GB in memory, and it usually sits at 500 MB free when VS is running. I don't think a lack of memory is causing the issue.
It might be bogging down my processor somehow, that would make sense. Isn't the music on a different thread from the video frame generating?
Maybe the loading of the uncompressed song is just not being nice enough to let the processor and the video card do the work of generating the video. Maybe it jams up the communication channel. The framedrop did go down to 4 last time it happened, so something is messing with it.
Besides, I don't even have swap turned on in Linux. If vegastrike ran out of memory, it will just crash. Which is fine by me. It did that a couple weeks ago when there was a big memory leak. I think that has been fixed now.
It might be bogging down my processor somehow, that would make sense. Isn't the music on a different thread from the video frame generating?
Maybe the loading of the uncompressed song is just not being nice enough to let the processor and the video card do the work of generating the video. Maybe it jams up the communication channel. The framedrop did go down to 4 last time it happened, so something is messing with it.
Besides, I don't even have swap turned on in Linux. If vegastrike ran out of memory, it will just crash. Which is fine by me. It did that a couple weeks ago when there was a big memory leak. I think that has been fixed now.