Help: MTP Device Scanning Very Slow [#9284]

Beta Testing for Windows Products and plugins

Moderator: Gurus

ACraigL
Posts: 152
Joined: Sun Dec 11, 2005 9:05 am

Help: MTP Device Scanning Very Slow [#9284]

Post by ACraigL »

A few "full disclosure" items:

1. I posted this in the device sync thread, but didn't get much of a discussion going -- was hoping for some additional expertise here.
2. This is concerning a modded Android device -- an HP Touchpad running an Alpha ROM, CyanogenMod9 (Android 4.0/ICS)

Before we get into the very understandable, "this is new, an alpha, frankenstein, etc." argument, please hear me out...

My destination settings for the device are all set to /myMedia/<rest of path here>/. The prior (and very stable) android ROM (based on Gingerbread) allowed access to the file system as a USB storage device with a drive letter, and it scanned the device in less that 10 seconds. There are really only categorized video files on this, maybe 100 files or so in all.

This new ROM is accessed as an MTP device. MM4 sees the device without issue, and I have configured it identically to the above. The problem is that it's taking over 20 minutes to scan the device before sync will occur. This happened even on the first attempt where the files did not yet exist on the device.

I'll also add that the actual sync is perfectly fine speed-wise... it's just the read/scan that is so slow. No issues reading this in Windows 7 directly, either. I can bounce in and out of the file system with normal, expected peformance

So my question is, can we confirm that MM4 will only scan what is in the destination settings, or does it hit the entire MTP device file structure? I am currently assuming the latter as there are many system & app folder/files available, and there is no way it should take this long to scan 1 folder with a few sub-folders and 100 files.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Help: MTP Device Scanning Very Slow

Post by nohitter151 »

MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
ACraigL
Posts: 152
Joined: Sun Dec 11, 2005 9:05 am

Re: Help: MTP Device Scanning Very Slow

Post by ACraigL »

nohitter, Thanks for pointing that out.

However, that bug report (and supporting comments) state that this functioning correctly in current builds -- that it should scan from only the folder(s) set in the destination folder. However, the time it takes to scan prior to sync suggest otherwise. Am I reading this incorrectly? Did you provide that link to show it as a known issue?
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Help: MTP Device Scanning Very Slow

Post by nohitter151 »

ACraigL wrote:nohitter, Thanks for pointing that out.

However, that bug report (and supporting comments) state that this functioning correctly in current builds -- that it should scan from only the folder(s) set in the destination folder. However, the time it takes to scan prior to sync suggest otherwise. Am I reading this incorrectly? Did you provide that link to show it as a known issue?
I think I linked to the wrong quote, I was referring to where Ludek says:
The device scanning process was significantly sped up in build 1316, also fixed some termination issues and adjusted to comply with 0006491 , i.e. now the whole device is looked up (reverted changes from builds 1301 - 1305), but the scan starts immediatelly after device plugging in (see issue 0006491 for details).

Fixed in build 1316.
In other words, the whole device is meant to be scanned, but the only content that can be modified/deleted is the content in the specified destination folders. I think scanning of the whole device is probably necessary in order to show the status bar for how much free space/audio/video/other is on the device.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
ACraigL
Posts: 152
Joined: Sun Dec 11, 2005 9:05 am

Re: Help: MTP Device Scanning Very Slow

Post by ACraigL »

Makes sense, but does not improve my situation any.

That being said, I found a Samba app for android that lets it be seen by windows as a network share over wifi. I mapped a drive directly to the /myMedia/ directory (technically it's /mnt/sdcard/myMedia/. Even though it's over wifi the scanning is now super-quick... why wouldn't it be -- it's only 3 directories -- and the changes are incremental, so it should not be excessively painful to sync day-to-day.

Bottom line, this will get me over the hump until either a) the next version of the ROM uses a drive letter rather than MTP, or b) MM4 can improve the scanning situation.

Thanks for the replies.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Help: MTP Device Scanning Very Slow

Post by nohitter151 »

ACraigL wrote:Makes sense, but does not improve my situation any.

That being said, I found a Samba app for android that lets it be seen by windows as a network share over wifi. I mapped a drive directly to the /myMedia/ directory (technically it's /mnt/sdcard/myMedia/. Even though it's over wifi the scanning is now super-quick... why wouldn't it be -- it's only 3 directories -- and the changes are incremental, so it should not be excessively painful to sync day-to-day.

Bottom line, this will get me over the hump until either a) the next version of the ROM uses a drive letter rather than MTP, or b) MM4 can improve the scanning situation.

Thanks for the replies.
You could already identify your device by the drive letter over USB instead of MTP by simply disabling the WMDM plugin for your device and configuring the USBmass plugin.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
ACraigL
Posts: 152
Joined: Sun Dec 11, 2005 9:05 am

Re: Help: MTP Device Scanning Very Slow

Post by ACraigL »

nohitter151 wrote: You could already identify your device by the drive letter over USB instead of MTP by simply disabling the WMDM plugin for your device and configuring the USBmass plugin.
I assume that would have to be by label only, correct? There is no drive letter... I'll have to give that a shot. Can you add more than one USBmass device? I only see the one option and I would like to keep it if possible.

UPDATE: Did not seem to work. There is no drive letter in windows natively, nor can it find it via USB Device ID. It pulls up an option, but it's clearly not right as it say 0mb and I can't do anything else with it.
nitronate33
Posts: 3
Joined: Mon Jan 30, 2012 2:48 pm

Re: Help: MTP Device Scanning Very Slow

Post by nitronate33 »

I have the exact same problem. I have tried a bunch of things, but it is obvious that MM is scanning the entire contents of the sdcard partition to obtain info that is not necessary for merely synching one folder full of music. The cost to performance far outweighs whatever info it is trying to obtain and display. You should be able to turn this off via some sort of option.

I have folders full of app settings, photos, etc. on my phone's sdcard directory that i DO NOT want or need MM to waste time scanning. Unfortunately, the fact that my Galaxy Nexus connects as an MTP device ONLY makes it impossible to use any other device driver interface or sync in any other manner.
ACraigL
Posts: 152
Joined: Sun Dec 11, 2005 9:05 am

Re: Help: MTP Device Scanning Very Slow

Post by ACraigL »

nitronate33 wrote:I have the exact same problem. I have tried a bunch of things, but it is obvious that MM is scanning the entire contents of the sdcard partition to obtain info that is not necessary for merely synching one folder full of music. The cost to performance far outweighs whatever info it is trying to obtain and display. You should be able to turn this off via some sort of option.

I have folders full of app settings, photos, etc. on my phone's sdcard directory that i DO NOT want or need MM to waste time scanning. Unfortunately, the fact that my Galaxy Nexus connects as an MTP device ONLY makes it impossible to use any other device driver interface or sync in any other manner.
I feel your pain. I managed to find a pretty good workaround though...

After several hours, and trying alternate sync tools (none matches the flexibility and customization of MM4). I finally happened upon a solution. Samba Filesharing App (https://market.android.com/details?id=c ... amba&hl=en) lets you map a drive letter on Windows by acting as a server share. Once configured I was able to map the sdcard as a network drive letter. The key to all this was to include the sync directory /myMedia/ (technically /mnt/sdcard/myMedia/) so it had very little to scan over wifi (only 3 folders!).

In MM4, there is a USB_MASS driver that I configured to match the drive letter and sync preferences. Since scanning is now very quick, and sync changes are incremental, using this day-to-day over wifi should not be a problem. It's not as fast as a cable, but I can leave it in the dock while it happens! Even better, I can now sync while I'm using my tablet -- like on the treadmill or playing a game. It's also nice because it contains a whitelist function, so only certain networks will enable the sharing.

The only thing you have to remember to do is to rescan the media... normally this happens automatically after you disconnect from the computer, but sync you never connected, this never gets initiated. I found another app, called "Rescan Media" (clever, right?) that will do this job happily. After I sync, I just run this app manually. I may eventually find a way to automate that as well.

Let me know if that helps or if you have any questions.

Bottom line, this will get me over the hump until the ROM goes back to a USB drive letter (please!) or MM can address this issue (not likely as it's been this way since 3.0).
nitronate33
Posts: 3
Joined: Mon Jan 30, 2012 2:48 pm

Re: Help: MTP Device Scanning Very Slow

Post by nitronate33 »

Yeah, unfortunately the Galaxy Nexus does not support USB Mass Storage, period. It isn't the ROM, it's the phone. I am forced to use MTP and as of yet I have not found any alternative. I just wished MTP was not so friggin' slow. It would be fine if MM didn't scan EVERYTHING, but since it does, I have to plug it in a good 10 minutes before I sync every time.
ACraigL
Posts: 152
Joined: Sun Dec 11, 2005 9:05 am

Re: Help: MTP Device Scanning Very Slow

Post by ACraigL »

nitronate33 wrote:Yeah, unfortunately the Galaxy Nexus does not support USB Mass Storage, period. It isn't the ROM, it's the phone. I am forced to use MTP and as of yet I have not found any alternative. I just wished MTP was not so friggin' slow. It would be fine if MM didn't scan EVERYTHING, but since it does, I have to plug it in a good 10 minutes before I sync every time.
Try my suggestion above. I really like it.
ACraigL
Posts: 152
Joined: Sun Dec 11, 2005 9:05 am

Re: Help: MTP Device Scanning Very Slow

Post by ACraigL »

Not sure how/when it was addressed, but the last beta version states "This build adds one more fix to improve playlist sync for some Android devices." I can confirm that scanning was MUCH faster that it has been in the past. Thank you MM team!

Note that it is still not as fast as the wireless sync I used as a work around, above, but given the actual media transfer is faster, it's worth it, by far.
Guest

Re: Help: MTP Device Scanning Very Slow

Post by Guest »

In MM4, there is a USB_MASS driver that I configured to match the drive letter and sync preferences.
Can you elaborate?

For the Generic Portable/Audio Device, I've set the Device Configuration with a Device Name, Drive Letter, and Drive Label. I've left USB Device ID blank, and tried each option in Find Device.

I don't see the device anywhere in MM.
nohitter151
Posts: 23640
Joined: Wed Aug 09, 2006 10:20 am
Location: NJ, USA
Contact:

Re: Help: MTP Device Scanning Very Slow

Post by nohitter151 »

Guest wrote:
In MM4, there is a USB_MASS driver that I configured to match the drive letter and sync preferences.
Can you elaborate?

For the Generic Portable/Audio Device, I've set the Device Configuration with a Device Name, Drive Letter, and Drive Label. I've left USB Device ID blank, and tried each option in Find Device.

I don't see the device anywhere in MM.
Don't fill all 3 labels, just use one. Best bet would be to just fill in the drive letter, it should show up on the left-hand side of MM in the media tree.
MediaMonkey user since 2006
Need help? Got a suggestion? Can't find something?

Please no PMs in reply to a post. Just reply in the thread.
ACraigL
Posts: 152
Joined: Sun Dec 11, 2005 9:05 am

Re: Help: MTP Device Scanning Very Slow

Post by ACraigL »

nohitter151 wrote:
Guest wrote:
In MM4, there is a USB_MASS driver that I configured to match the drive letter and sync preferences.
Can you elaborate?

For the Generic Portable/Audio Device, I've set the Device Configuration with a Device Name, Drive Letter, and Drive Label. I've left USB Device ID blank, and tried each option in Find Device.

I don't see the device anywhere in MM.
Don't fill all 3 labels, just use one. Best bet would be to just fill in the drive letter, it should show up on the left-hand side of MM in the media tree.
Exactly. I just used drive letter. It won't find a USB device due to the fact it's a MTP interface.
Oh, and for whatever reason, the first time after I install a new rev, it does not identify my network. I have to exit and relaunch MM for it to properly identify my network shares.
Post Reply