Results 1 to 10 of 11
i am writing a c++/qt application. this application receives ethernet data about 6 times a second. it uses this data to update and display a picture (pixmap) at about 60Hz. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-05-2005 #1Just Joined!
- Join Date
- Feb 2005
- Location
- Tampa, FL
- Posts
- 27
optimizing x performance
i am writing a c++/qt application. this application receives ethernet data about 6 times a second. it uses this data to update and display a picture (pixmap) at about 60Hz. at first glance, it looks okay, but i notice two problems. first, the screen flickers on update. i'm guessing this has something to do with the monitor's vertical refresh, but i'm not sure how to address that issue. second, after the app runs for a bit, i notice that the ethernet routine is actually running faster than the display routine. when i check for resource usage, i see that X is using about 60% of the cpu. since i'm pretty new to linux in general, i'm not sure if this is normal for an application like this, or if there is something i can do to make X run faster/smoother. another possibility is my graphics card. i am running fc2, with kde, on a dual pentium setup (~2.? GHz) with an NVIDIA Quado NVS and 2GB RAM. i guess the final possibility is that my code is just too slow, but i'm hoping that someone might have another idea. thanks for your help.
-duffman
- 04-05-2005 #2
First, where in tampa are you from?
Second, why do you have the picture refreshing at 60 times per second, as you're only getting new data six times per second? And what do you mean by the ethernet routine runs faster than the screen update? How are you determining this?
- 04-06-2005 #3Just Joined!
- Join Date
- Feb 2005
- Location
- Tampa, FL
- Posts
- 27
first, i live near the airport and westshore mall, etc.
second, i need the picture to scroll cleanly, so i incrementally display the data slice that i get. i try to display it in ten pieces before i get the next data slice. i know that i am getting data faster than i am displaying because eventually, my circular receive buffer fills up and packets start getting dropped, causing an unsightly "squishing" effect on my picture. after some futher research, it appears that this may be because i am using a QPixmap to display the image in a QLabel. since i need to access the actual byte data of the picture, i have to use a QImage, then convert to the QPixmap, then show the pixmap in the label. so... this may be a topic for another forum, but i would still like to know how to get rid of the blinking on the screen and if i can make X run more efficiently. thanks for your help.
-duffman
- 04-06-2005 #4
First: Oh okay, I know where that is.
Second: what does glxgears say about your framerate?
- 04-07-2005 #5Just Joined!
- Join Date
- Feb 2005
- Location
- Tampa, FL
- Posts
- 27
glxgears, which i had never seen before, normally shows 264 fps. there are occasionally jumps of about +/- 20 fps, but for the most part 264 fps is the number. that seems really fast. and the gears looked really crappy, most likely because they were spinning so fast. is that framerate good, bad, or indifferent? thanks again for your help.
-duffman
- 04-07-2005 #6Just Joined!
- Join Date
- Aug 2004
- Location
- Ontario, Canada
- Posts
- 89
Do you have 3D acceleration working? I have ATI Radeon 9200 and I get about 1500fps with 3D acceleration
- 04-07-2005 #7Just Joined!
- Join Date
- Feb 2005
- Location
- Tampa, FL
- Posts
- 27
no. i have a crappy NVIDIA Quadro NVS with AGP8X. i don't think it does anything fancy at all. i had a decent card, but i was preempted by a more important job at work. do you think this is my ultimate problem? or is there something i can do to X that might help some. thanks.
-duffman
- 04-07-2005 #8
You could try a faster graphics updating deal. (i.e. greater than 60hz)
- 04-07-2005 #9Just Joined!
- Join Date
- Feb 2005
- Location
- Tampa, FL
- Posts
- 27
when you say, "try a faster graphics updating deal", do you mean in my program, or something in my hardware? if you are talking about my program, that won't work, as its not fast enough to do even 60Hz. if you mean hardware, could you elaborate? also, if anyone has some good resources on making X, openGL, and NVIDIA play nice, please let me know. thanks.
-duffman
- 04-07-2005 #10
I meant in your program. Sorry, I don't really know what else to do.


Reply With Quote
