GUI is slooooow and CPU hogging

37 views
Skip to first unread message

Rice

unread,
Dec 26, 2010, 7:35:25 PM12/26/10
to OkeOke.Net
Platform:
Dell D600 (probably 5 years old) with English Windows XP3, 1.8 GHz
CPU, 1.5 GB RAM
With minimal other programs installed.

(I can run Media Player Classic to play 720p MKV files fine on this
PC.)

I have OkeOke 1.81 up and running, and playing a MKV KTV movie.

The movie playing the Mplayer is just very chopping, probably at frame
rate of under 10 f/s.
The video is lagging behind the audio by a couple of seconds.

I observed in Windows Task Manager that OkeOke is running about 45% of
my CPU, and Mplayer is running about 40%.

If I minimize the OkeOke GUI and only leave the mplayer on the screen,
CPU usage of OkeOke drops down to 15%, and Mplayer increases slightly,
and the MKV video will play well without apparent chopping low
framerate.


I guess the sluggishness of the GUI is not only for slower PC. On my
other new Dual core 2.33 GHz CPU PC with 6 GB RAM, I can feel that the
OkeOke program responses fine, but a little bit slow.

Is this something to do with the microsoft .Net GUI control
components?

Rice

unread,
Dec 26, 2010, 7:38:40 PM12/26/10
to OkeOke.Net
I tried again on my other Dell 8600 laptop PC (1.6 GHz CPU, 1.0 GB
RAM). The OkeOke program is just unusable. It was just too slow. It
was slow to open up, and slow responding to my mouse clicks.

OK OK

unread,
Dec 26, 2010, 8:03:36 PM12/26/10
to okeo...@googlegroups.com
Hi Rice,
 
I think the performance issue has a bigger impact on single core system. I will add some option to reduce some function to make the program run more smooth in older machine.
 
Thanks,
Dan

2010/12/26 Rice <rice...@gmail.com>
I tried again on my other Dell 8600 laptop PC (1.6 GHz CPU, 1.0 GB
RAM). The OkeOke program is just unusable. It was just too slow. It
was slow to open up, and slow responding to my mouse clicks.

--
您收到此邮件是因为您订阅了 Google 网上论坛的“OkeOke.Net”论坛。
要向此网上论坛发帖,请发送电子邮件至 okeo...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 okeokenet+...@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/okeokenet?hl=zh-CN 访问此网上论坛。


OK OK

unread,
Dec 27, 2010, 3:49:31 AM12/27/10
to okeo...@googlegroups.com
Hi Rice,
 
A new build was released. It has a new option to disable some animation for performance enhancement. If you run the program in a single core system, that option is enabled by default. Please let me know if that helps.
 
Regards,
Dan

2010/12/26 OK OK <lets...@gmail.com>

Rice

unread,
Dec 27, 2010, 12:56:16 PM12/27/10
to OkeOke.Net
Dan, I will give it a try today after work today.

On Dec 27, 2:49 am, OK OK <letso...@gmail.com> wrote:
> Hi Rice,
>
> A new build was released. It has a new option to disable some animation for
> performance enhancement. If you run the program in a single core system,
> that option is enabled by default. Please let me know if that helps.
>
> Regards,
> Dan
>
> 2010/12/26 OK OK <letso...@gmail.com>
>
> > Hi Rice,
>
> > I think the performance issue has a bigger impact on single core system. I
> > will add some option to reduce some function to make the program run more
> > smooth in older machine.
>
> > Thanks,
> > Dan
>
> > 2010/12/26 Rice <rice2...@gmail.com>
>
> > I tried again on my other Dell 8600 laptop PC (1.6 GHz CPU, 1.0 GB
> >> RAM). The OkeOke program is just unusable. It was just too slow. It
> >> was slow to open up, and slow responding to my mouse clicks.
>
> >> --
> >> 您收到此邮件是因为您订阅了 Google 网上论坛的"OkeOke.Net"论坛。
> >> 要向此网上论坛发帖,请发送电子邮件至 okeo...@googlegroups.com
> >> 要取消订阅此网上论坛,请发送电子邮件至 okeokenet+...@googlegroups.com<okeokenet%2Bunsu...@googlegroups.com>
> >> 。
> >> 若有更多问题,请通过http://groups.google.com/group/okeokenet?hl=zh-CN访问此网上论坛。

Rice

unread,
Dec 28, 2010, 12:32:01 AM12/28/10
to OkeOke.Net
Dan, I am not sure if the new version works or not, at least, it is
not worse, but it is not apparently better, either.

Put this way, the OkeOke EXE is still running 45 to 60% CPU if it is
left viewable. If it is minimized, it uses 15 to 25% CPU.
In the meantime, the mplayer.exe uses 30% CPU, and another instance of
mplayer.exe uses 10%.

Here are my questions:
1) Why are there two instances of mplayer.exe? one for video/audio,
and the second one for the second audio channel?
2) Is OkeOke actively synchronize with mplayer.exe? Why does
OkeOke.exe need so much CPU time while the video/audio is playing in
mplayer.exe and OkeOke.exe is in fact doing nothing at the time?
3) From what I see and hear, audio and video are often out of sync
because of lacking of CPU time for the mplayer.exe. How do you make
sure the A/V synchronization or nothing is done yet at this moment?
4) Without playing any A/V, the OkeOke.exe often uses high percentage
of CPU. Is the program doing something of GUI rendering, or background
processing? The CPU usage seems too high to me.

Here are some suggestions:
1) You can probably try to use Intel Vtune profiler or something
similar. Vtune is available for free for something like 30 days,
integrated in Visual studio. I used it before. It is really nice and
would give you the detailed reports of function-by-function based CPU
cycle usage. The report will help you to narrow down to the hot spots,
to the lines of code.
2) Try to avoid some of these .Net GUI control components. I heard
that such GUI components are often very slow and CPU hogging because
they were programmed for both local and online usage, and never
optimized for local application usage. Again, I am not 100% of this
because I have never used such GUI components.


I wish the best luck to you, and happy new year.


Rice

OK OK

unread,
Dec 28, 2010, 1:01:02 AM12/28/10
to okeo...@googlegroups.com
Hi Rice,
 
Thanks a lot for the feedback, really appreciate that.
 
In your test machine, can you check if the "disable some animation for performance enhancement" is checked? The option is listed in application setting dialog, under a combo box. I tested the latest build in an old dell 700M (1.6G cpu single core, 1GB memory). Older version of okeoke does have the cpu issue. The new version seems have that fixed. Please let me know if that option is checked.
 
For the two instance of mplayers, the second one is used to playback the original audio. Typically it uses very little cpu as it processes audio only. The program sync the two mplayer when the replay starts. So they could go out of sync if cpu is taken over by other processes.
 
When the program is not playing anything, and the playlist is empty, it shouldn't be doing anything other than the mast database update. The update requires the program to download updates from web server and do comparison with your local copy of master database. That could use some cpu, but since you are running the latest version, there shouldn't be any update available. My old test machine is running windows 7, that might make some difference. I did test the program in a virtual PC running windows XP. Since the host machine has a 4 core CPU, I can't reproduce the issue either. I will try to find an old box with XP and do some test.
 
As of the profiling, I did some test within visual studio already. I will try out that vtune as well. Thanks for the information.
 
Happy new year to you too!
 
Dan

2010/12/27 Rice <rice...@gmail.com>
Message has been deleted
Message has been deleted

Raymond Cai

unread,
Dec 28, 2010, 2:44:14 AM12/28/10
to okeo...@googlegroups.com

When I play “我要去西藏”, the audio and video is out of sync.  Maybe this one can be used for testing?  I’m using dell inspiron 530, 4g ram, visa 32bit, and the "disable some animation for performance enhancement" is checked.  Thank you for your hard work.

Raymond

 

OK OK

unread,
Dec 28, 2010, 3:01:12 AM12/28/10
to okeo...@googlegroups.com
Hi Raymond,
 
I do have this song (mkv file with size about 26MB), and just did a test, and i don't see the out of sync issue. My computer is also inspiron 530 (Q6600 cpu), though running 64bit win7, not vista.
Do you see high CPU usage while playing this song? Since the machine CPU has 4 or maybe 2 cores, show some animation won't really slow mplayer.
 
Can you also do one test for me? Go to application setting->player setting tab, check the checkbox of "save mplayer output", play the song, close the program, and email me mplayerlog.txt in the program folder (sup...@okeoke.net).
 
Thanks,
Dan

2010/12/27 Raymond Cai <cai.r...@gmail.com>

When I play “我要去西藏”, the audio and video is out of sync.  Maybe this one can be used for testing?  I’m using dell inspiron 530, 4g ram, visa 32bit, and the "disable some animation for performance enhancement" is checked.  Thank you for your hard work.

Raymond

 

--

Raymond Cai

unread,
Dec 28, 2010, 3:29:29 AM12/28/10
to okeo...@googlegroups.com

Hi Dan -- I don’t see high CPU usage while playing “我要去西藏”. Okeoke.exe is mostly 2%, and the 2 mplyer.exe are around 3% and 5%.  I’m including the log file as well.

Form the log file, I can see that there is an error Cannot open 'J:\软件\OkeOke.Net\data\MasterOkeDB.sdf'. Provider 'System.Data.SqlServerCe.3.5' not installed.  That was because I’ve copied everything from J drive to F drive, and now I’m using F driver only.    How do I fix this?  Shall I re-scan all the songs or re-install something?  Thx.  

Raymond

log.txt

OK OK

unread,
Dec 28, 2010, 3:35:24 AM12/28/10
to okeo...@googlegroups.com
Hi Raymond,
 
That error was from an older version of the program. I think at that time it's using an absolute path. Newer version uses relative path, so it doesn't matter which disk the program is located. I don't see the error in your last startup, so it should be clear from that error already, nothing needs to be done.
 
Can you email me mplayerlog.txt as well? The info related out-of-sync issue can only be found in that log file.
 
Thanks,
Dan

2010/12/28 Raymond Cai <cai.r...@gmail.com>

Hi Dan -- I don’t see high CPU usage while playing “我要去西藏”. Okeoke.exe is mostly 2%, and the 2 mplyer.exe are around 3% and 5%.  I’m including the log file as well.

Form the log file, I can see that there is an error Cannot open 'J:\软件\OkeOke.Net\data\MasterOkeDB.sdf'. Provider 'System.Data.SqlServerCe.3.5' not installed.  That was because I’ve copied everything from J drive to F drive, and now I’m using F driver only.    How do I fix this?  Shall I re-scan all the songs or re-install something?  Thx.  

Raymond

--

Raymond Cai

unread,
Dec 28, 2010, 3:52:13 AM12/28/10
to okeo...@googlegroups.com

Hi Dan – I see. I’m attaching the mplayerlog.txt as well.  Sorry that I picked a wrong file (log.txt) in my previous email.  This file is quite big, so I had to delete the old data.

While play the out-of-sync song, if I change the playing-percentage position, the sync will become correct.  Thx.

Raymond

mplayerlog.txt

Rice

unread,
Dec 28, 2010, 8:25:10 AM12/28/10
to OkeOke.Net
Dan, I turned on the option "disable animation" when I tested it.
BTW, that option was not turned on automatically for me as you
suggested that it should be on for single core machines. I had to turn
it on manually.

On Dec 28, 12:01 am, OK OK <letso...@gmail.com> wrote:
> Hi Rice,
>
> Thanks a lot for the feedback, really appreciate that.
>
> In your test machine, can you check if the "disable some animation for
> performance enhancement" is checked? The option is listed in application
> setting dialog, under a combo box. I tested the latest build in an old dell
> 700M (1.6G cpu single core, 1GB memory). Older version of okeoke does have
> the cpu issue. The new version seems have that fixed. Please let me know if
> that option is checked.
>
> For the two instance of mplayers, the second one is used to playback the
> original audio. Typically it uses very little cpu as it processes audio
> only. The program sync the two mplayer when the replay starts. So they could
> go out of sync if cpu is taken over by other processes.
>
> When the program is not playing anything, and the playlist is empty, it
> shouldn't be doing anything other than the mast database update. The update
> requires the program to download updates from web server and do comparison
> with your local copy of master database. That could use some cpu, but since
> you are running the latest version, there shouldn't be any update available.
> My old test machine is running windows 7, that might make some difference. I
> did test the program in a virtual PC running windows XP. Since the host
> machine has a 4 core CPU, I can't reproduce the issue either. I will try to
> find an old box with XP and do some test.
>
> As of the profiling, I did some test within visual studio already. I will
> try out that vtune as well. Thanks for the information.
>
> Happy new year to you too!
>
> Dan
>
> 2010/12/27 Rice <rice2...@gmail.com>
> > <okeokenet%2Bunsu...@googlegroups.com<okeokenet%252Buns...@googlegroups.com>
>
> > > > >> 。
> > > > >> 若有更多问题,请通过http://groups.google.com/group/okeokenet?hl=zh-CN访问此网上论坛。
>
> > --
> > 您收到此邮件是因为您订阅了 Google 网上论坛的"OkeOke.Net"论坛。
> > 要向此网上论坛发帖,请发送电子邮件至 okeo...@googlegroups.com
> > 要取消订阅此网上论坛,请发送电子邮件至 okeokenet+...@googlegroups.com<okeokenet%2Bunsu...@googlegroups.com>
> > 。
> > 若有更多问题,请通过http://groups.google.com/group/okeokenet?hl=zh-CN访问此网上论坛。

Rice

unread,
Dec 28, 2010, 8:33:03 AM12/28/10
to OkeOke.Net
One useful thing I forgot to mention in my other post about a/v out of
sync.

When I saw video was choppy and lagging behind of audio, the audio was
always fine, never chocked or paused.

I guess you guys can think for a moment about what this means.

Again, using two instance of mplayer.exe seems to be a strange choice
to me. Should there be a way around by using only one mplayer?

On Dec 28, 2:52 am, "Raymond Cai" <cai.raym...@gmail.com> wrote:
> Hi Dan - I see. I'm attaching the mplayerlog.txt as well.  Sorry that I
>  mplayerlog.txt
> 312KViewDownload
Reply all
Reply to author
Forward
0 new messages