CPU usage problems?

Found a bug in Vectir? Report it here with as much detail as possible.

Re: CPU usage problems?

Postby Daniel » Sat Jul 24, 2010 10:15 am

I managed to reproduce the volume bar not updating problem but only once. As you suggested this seems to be an intermittent problem. The resolution for now is to send a volume up/down command from your phone and the correct volume should then be displayed. It seems that the initial volume value is sometimes not received by the client when the profile is first loaded.

data sinks for track and playlist info (e.g. item x of y) are no longer populated

I can't find any problem here. With WMP plugin 2.0.4, the track and playlist information is always available and correct when I load the WMP profile. It might be a good idea to import the default WMP profile and try that. You can downoad it from the WMP Remote Control page.

WMP only adds this info once the particular playlist item has been accessed

Vectir doesn't read information from the media files themselves, it relies on WMP to report this information. As far as I can tell, WMP will only report this information if a track is actively playing. Just selecting a track isn't enough. If I open WMP and select a track without playing it, there will be no information about the track displayed on the WMP profile. It only gets displayed when playback starts. I just tried plugin version 2.0.3 and observed the same behavior.

If I misunderstood the problem, could you please list steps to reproduce?

I'll have a look at the problem with the volume not updating on monday.

Thanks Francois
Daniel
Incendo Technology
http://www.vectir.com
User avatar
Daniel
Site Admin
 
Posts: 106
Joined: Thu Oct 29, 2009 7:19 pm
Location: UK

Re: CPU usage problems?

Postby fvisagie » Sat Jul 24, 2010 3:28 pm

Hi Daniel,

With the default Generic WMP profile results stay the same. What you say about the plugin & the remote only displaying what media info WMP provides is how I had understood it, and even so it appears to me that there are problems.

Daniel wrote:If I misunderstood the problem, could you please list steps to reproduce?


Sorry if my description wasn't clear, I'll try to improve it :-).

With plugin 2.0.3 all available data bindings (i.e. those sources that WMP provided data for) worked correctly all the time, on both WMP9 and WMP11. In other words, data bindings corresponding to media info that was available in WMP had their values correctly displayed, and any data bindings not populated by WMP were left blank.

With 2.0.4 and WMP9:
Playback progress is displayed, as is volume most of the time.
No other data bindings work anymore. This is straight-forward to reproduce ;-).

With 2.0.4 and WMP11:
Playback progress is displayed, as is volume most of the time.
When a playlist item is selected for which WMP has media info for ALL data bindings in the profile, data bindings for that playlist item and its playlist position are displayed correctly. This is the same behaviour as with 2.0.3.
(*) When a playlist item is selected and the profile has bitrate and/or length data bindings for which WMP does not have media info, NO data bindings for that playlist item and its playlist position are displayed correctly. They are either left blank or contain the values from the previously selected playlist item. In 2.0.3, available data bindings were displayed and others were left blank.

(*) Steps to reproduce (remember this is with WMP11, with WMP9 no playlist item and position data bindings work):
1. Populate a WMP playlist with a mixture of WMV and non-Microsoft files e.g. MPG or M4V. Don't use AVI, that's MS ;-). Make sure your WMP can play the file types you use. Let's use M4V in this example.
2. When the playlist is opened in WMP, it should display bitrate and length information for the WMV files but not for the M4V files
3. With plugin 2.0.3, open the Generic WMP profile
4. Select a WMV file and verify that all data bindings are populated
5. Select an M4V file and verify that all data bindings are populated, except bitrate and length
6. Play the M4V file and verify bitrate and length are now displayed
7. Restart WMP and verify that the playlist displays bitrate and length information for the WMV files but not for the M4V files, as before
8. Reopen the Generic WMP profile with plugin 2.0.4
9. Select an M4V file and verify that ALL playlist item and position data bindings are now empty
10. Select a WMV file and verify that all data bindings are populated
11. Select an M4V file and verify that ALL data bindings are left populated with data from the previous selection
12. Play the M4V file
13. Verify in WMP that bitrate and length media info have now been added for that file
14. On the remote, verify that all data bindings are displayed now that bitrate and length have become available

So this behaviour is governed by either bitrate and/or length not being available to start with. To determine which one/s and whether any other data bindings cause this kind of behaviour is a little beyond my control over what happens in WMP!

Kind regards,
Francois
fvisagie
 
Posts: 24
Joined: Sun Jul 18, 2010 1:34 pm
Location: SA

Re: CPU usage problems?

Postby Daniel » Mon Jul 26, 2010 9:15 am

Hi Francois,

How on earth did you manage to get WMP to play M4V files? My attempts were not successful.

I followed your instructions to best I could with a playlist containing a mixture of MP3, MP4, MPG, and WMV files. With these file types, the correct information is always displayed. If a field is not available, it will be left blank and not show any left over information from the previous track.

I suspect the problem may be isolated to M4V files. Plugin version 2.0.3 may have worked because it was always polling for information from WMP. Because WMP doesn't natively support M4V, it may not be firing a "New Media" event when an M4V file is loaded.

If you have the time, it would be really useful if you could repeat the test with no M4V files in your playlist. If we can say for sure the problem only happens for M4V files, it will help find a solution. It would also be useful to know if Vectir shows correct information for all items in a playlist only holding MP3 files.

Still looking for a solution to the volume not updating problem. I noticed the same thing once for plugin version 2.0.3 so it may have been around for a while.

Thanks
Daniel
Incendo Technology
http://www.vectir.com
User avatar
Daniel
Site Admin
 
Posts: 106
Joined: Thu Oct 29, 2009 7:19 pm
Location: UK

Re: CPU usage problems?

Postby fvisagie » Mon Jul 26, 2010 2:48 pm

Daniel wrote:How on earth did you manage to get WMP to play M4V files? My attempts were not successful.

K-Lite_Codec_Pack_604_Standard.exe (an ffdshow etc. distribution) helped a lot :-)

Daniel wrote:I followed your instructions to best I could with a playlist containing a mixture of MP3, MP4, MPG, and WMV files. With these file types, the correct information is always displayed. If a field is not available, it will be left blank and not show any left over information from the previous track.

I suspect the problem may be isolated to M4V files. Plugin version 2.0.3 may have worked because it was always polling for information from WMP. Because WMP doesn't natively support M4V, it may not be firing a "New Media" event when an M4V file is loaded.

If you have the time, it would be really useful if you could repeat the test with no M4V files in your playlist. If we can say for sure the problem only happens for M4V files, it will help find a solution. It would also be useful to know if Vectir shows correct information for all items in a playlist only holding MP3 files.


So you did get cases where bitrate and duration only were blank, yet the remaining fields were displayed correctly, with 2.0.4? That wouldn't make any sense to me!

I'll try update the steps to reproduce, but in the meantime some more information:
    This WMP behaviour of updating fields only happens when playing a playlist. WMP does not update fields when playing from a video collection such as All Video :-(.
    The Vectir behaviour of not displaying any fields when some are empty seems to be governed by both bitrate and duration. When bitrate (which in some cases comes from the audio track!) and duration are available, everything works as with 2.0.3. Ditto, when only bitrate is available. However, when BOTH are unavailable which is usually the case when bitrate is missing, nothing is shown until WMP has played the track and populated DURATION in the Now Playing view.
    I've seen this behaviour with M4V, MP4 and MPG. The machine where I saw this behaviour with MPG uses ffdshow for decoding. On the other machine with the CyberLink MPEG-2 decoder, exactly the same MPG file behaved like a WMV file - all information displayed all the time ;-).
    So it's clear that the extent to which WMP populates fields prior to feedback is determined by how well it understands the format, and Vectir 2.0.4's behaviour seems determined by at least bitrate (possibly in combination with duration).
    I attach a MP4 file encoded for a Nokia smartphone that causes this behaviour on both my machines. If you have Nokia PC Suite 7.x or any of its video components installed, your WMP should be able to play this (and only populate duration in the Now Playing view once played). You should get the same behaviour with ffdshow.

The test file is at http://www.mediafire.com/file/smsnd6msrvm8j6p/Test.mp4.

Steps to reproduce:

With 2.0.4. and WMP9:
Other than volume and playback progress, no playlist item or position data bindings are displayed ever.

With 2.0.4 and WMP11:
1. Find a file for which WMP does not display duration and bitrate in Library collections (hopefully the attached file does the trick)
2. Add that file and a native WMV file to the same playlist
3. Close and restart WMP (this removes any cached bitrate/duration data for "non-native" files)
4. In the Library view, click the playlist's name and select Add to Now Playing
5. Open the Now Playing view and verify that only the WMV file's duration is shown
To show that data bindings are displayed when all are available:
6. Using WMP's Next/Previous controls, ensure the play selection is on the WMV file
7. Open the Generic WMP profile and verify that all data bindings are shown
8. Disconnect the Vectir remote and restart Vectir on the PC (to flush cached data)
To show that no data bindings are displayed when bitrate and/or duration are unavailable:
9. Using WMP's Next/Previous controls, ensure the play selection is on the other file
10. Open the Generic WMP profile and verify that no playlist item or position data bindings are shown (duration is also shown as 00.00)
To show that cached data binding data is displayed when bitrate and/or duration are unavailable:
11. Use any Next/Previous controls to move the play selection to the WMV file
12. Verify that all its data bindings are shown
13. Use any Next/Previous controls to move the play selection to the other file
14. Verify in WMP that the selection has moved to the other file, but that the previous selection's data bindings are shown
To show that data bindings are displayed once duration/bitrate become available:
15. Using any controls play the other file
16. Verify that WMP has populated its duration in the Now Playing view, but that Vectir remote still displays the previous selection's data
17. Using any Next/Previous controls, move the play selection to the WMV file and back to the other file
18. Verify that - now that duration/bitrate are available - all data bindings are shown

These steps work! The trick is to make sure you get a file that has both duration and bitrate missing when viewed in a Library collection such as All Video.

On the topic of performance and the logging textbox, as you suggested I dragged the slider up and down. Although I'm unsure how much movement is required to simulate a typical remote event rate, the performance hit was similar to that seen with command processing, as you suggested!

I also did some comparative testing with Nokia Wireless Presenter (only keypress commands available). I compared it against a keypress-only Vectir profile on my 900 MHz netbook where CPU load changes are better visible.

As reported previously, with Vectir WMP 2.0.4:
Static Vectir CPU usage: 0 - 2% (sometimes 3%)
Command processing CPU usage: 22 - 45%

Static NWP CPU usage: 0 - 2%
Command processing usage: 0% (not possible to detect any additional CPU load from command processing)

I hope this helps!

Kind regards,
Francois
fvisagie
 
Posts: 24
Joined: Sun Jul 18, 2010 1:34 pm
Location: SA

Re: CPU usage problems?

Postby Daniel » Tue Jul 27, 2010 8:12 am

Success!

I was able to reproduce the issue using the file you supplied and your instructions. Thanks for persevering.

The good news is that it was easy to fix. The problem was that an exception was being thrown when the bit rate wasn't available. This was preventing a data update event from firing. WMP plugin version 2.0.5 should fix the problem.

Command processing CPU usage: 22 - 45%

With the text box updates disabled, I see 3-4%. The next release will try to address this issue. The text box will not be updated when Vectir is minimised to the taskbar or system tray. Your suggestion of turning off the text box log updates when the activity log panel is collapsed is also a good idea. Vectir can still cache the log data and re-display it when the activity log text box becomes visible again.

Thanks for your help Francois :)
Daniel
Incendo Technology
http://www.vectir.com
User avatar
Daniel
Site Admin
 
Posts: 106
Joined: Thu Oct 29, 2009 7:19 pm
Location: UK

Re: CPU usage problems?

Postby fvisagie » Tue Jul 27, 2010 10:36 am

Well done Daniel :-) I'm looking forward to the next release.

For now I've moved to Media Player Classic - Home Cinema (bundled in the above K-Lite codec distribution). Its native jump back/forward controls work for all file types tested so far (unlike WMP's which only seem to work for MS file types, unless you use Vectir's clever plugin ;-)). Those controls are available via keypresses, meaning I can use a light-weight remote control like Nokia Wireless Presenter which has less CPU impact currently. Apparently MPC-HC also natively supports text subtitles (SSA/* etc.), although I have yet to test how user-friendly that support is.

This means that I won't be able to provide you with WMP-related feedback that easily or quickly for the time being. But on the other hand, if the need arises you know where to get MPC-HC-related feedback from :-).

Kind regards,
Francois
fvisagie
 
Posts: 24
Joined: Sun Jul 18, 2010 1:34 pm
Location: SA

Re: CPU usage problems?

Postby Daniel » Tue Jul 27, 2010 1:25 pm

Hi Francois,

Until the next release is available, you can use 2.0.3 build 11.

In this build I've completely disabled the log text box. While running keyboard commands the CPU usage now stays at 0%! No excuse for using Nokia wireless presenter now ;) A Media Player Classic profile can be setup with a minimum of effort.

The solution to the text box problem may be to write my own. I have no idea what Microsoft have done in their WPF text box that could possibly require that much CPU. I'm surprised this issue hasn't come up until now. I guess its only really a problem on older slower machines. The sloweset machine I have tested on is a 4 year old laptop with a 1.6Ghz Core 2 duo processor. Vectir runs on it without any problems - even with v2.0.3 of the WMP plugin.

I will be interested to hear how you get on with build 11,
Thanks
Daniel
Incendo Technology
http://www.vectir.com
User avatar
Daniel
Site Admin
 
Posts: 106
Joined: Thu Oct 29, 2009 7:19 pm
Location: UK

Re: CPU usage problems?

Postby fvisagie » Thu Jul 29, 2010 2:02 pm

Hi Daniel,

The reduction in CPU usage = response improvement is phenomenal! Well done, this is a fantastic improvement!

On both the 2 GHz laptop and the netbook I now cannot distinguish keypress commands being executed from the already low base CPU usage of the Vectir server. Even on the 2 GHz some commands would previously consume almost half of available CPU power, and rapidly repeated commands (e.g. mouse cursor movement buttons held down) would take up to 78%. Now the execution of commands doesn't even visibly register anymore!

FWIW there were 2 issues I hadn't experienced before build 11 - the Vectir server stopped responding to the remote twice with it, and once the media player hung. It's too early in my view to lie these at the door of Vectir, plus there's not enough to go on for suspecting any kind of pattern yet. If I learn anything more about this I hope to let you know.

Well done again, and I'm looking forward to the release! Good luck with the SDK also :-).

Kind regards,
Francois
fvisagie
 
Posts: 24
Joined: Sun Jul 18, 2010 1:34 pm
Location: SA

Re: CPU usage problems?

Postby Daniel » Sat Aug 21, 2010 8:49 am

CPU usage has been significantly reduced from Vectir version 2.3.1.0. The activity log text box is not updated when the Activity log panel is collapsed or when Vectir is minimised. Some changes were made to the WPF textbox control that reduces the CPU usage when the textbox is visible.
Daniel
Incendo Technology
http://www.vectir.com
User avatar
Daniel
Site Admin
 
Posts: 106
Joined: Thu Oct 29, 2009 7:19 pm
Location: UK

Previous

Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest

cron