Loads of bad news
I finished fwatch up a few days ago... but I thought it was broken. Turns out it was just a cpu hog... I basically had a while loop that never exits constantly checking the scrlog.txt file for updates. Since it was constantly checking it ate all the cpu cycles leaving nothing for folding. At the time I didn't know this. I thought I just couldn't code at all and my future was screwed (as I plan to be a programmer) Last night I got bored and started playing around with some ideas. I found out what I was doing with fwatch worked fine and I didn't just totally blow as a programmer. So earlier today I made a quickie script to print out the time between each frame. Ran it and watched. After about five minutes without any output I got mad again. On a whim I ran task info and noticed the perl script was taking 95% of the cpu to folding's 2%!!! Total suckage! Even after setting the perl script to idle priority it was taking about 20% on average. I could just put folding on normal priority but then it sucks all the cpu up and makes EVERYTHING slow. I'm trying to decide if the performance hit is worth it. Plus the fact that I'll have to rewrite fwatch since I deleted it. If I think of a better way to monitor the file or a way to get the while loop to calm down, i'll go for it. Until then PP is our only choice
Or the partly working fwatch port already floating around...
Edit: Typos and a new idea... I've thought about adding in a sleep to the loop. But when it starts the loop it goes through the entire scrlog.txt file until it hits the end, then starts taking time. If folding has been going for a while the sccrlog.txt file can be HUGE (mine is easily around 1500 lines right now...) and with a 5 second pause between every line you'll be waiting a while before you get any actual time reporting done. One work around would be having it go through the file, then starting the loop which would work great. As a matter of factly I'll make it do that. heheh this rocks. Now for the final problem, if the pause is too long it might miss an update throwing of the times. Sicne windows sucks, I'm having to use difference between the time of each update to get the times. Unlike in linux when you can check the time the process has been running and divide by the frame count (as the linux fwatch does). Enough boring theory talk... I don't wanna challenge Poof's crown of long posting... She might hurt me
[This message was edited by Skinny Little White Boy on January 13, 2001 at 16:58.]
Edit: Typos and a new idea... I've thought about adding in a sleep to the loop. But when it starts the loop it goes through the entire scrlog.txt file until it hits the end, then starts taking time. If folding has been going for a while the sccrlog.txt file can be HUGE (mine is easily around 1500 lines right now...) and with a 5 second pause between every line you'll be waiting a while before you get any actual time reporting done. One work around would be having it go through the file, then starting the loop which would work great. As a matter of factly I'll make it do that. heheh this rocks. Now for the final problem, if the pause is too long it might miss an update throwing of the times. Sicne windows sucks, I'm having to use difference between the time of each update to get the times. Unlike in linux when you can check the time the process has been running and divide by the frame count (as the linux fwatch does). Enough boring theory talk... I don't wanna challenge Poof's crown of long posting... She might hurt me
[This message was edited by Skinny Little White Boy on January 13, 2001 at 16:58.]