Initial scanning very slow on Android

Get answers about syncing MediaMonkey 4 with iPods and other devices.

Moderator: Gurus

MonkeyStrut
Posts: 97
Joined: Wed May 16, 2012 8:23 pm

Re: Initial scanning very slow on Android

Post by MonkeyStrut »

Fresh new versions of MMW and MMA. Written that sync issues with Kitkat, SD card, and windows were fixed, but syncs are just as long as before! I had some hope though.
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Initial scanning very slow on Android

Post by Lowlander »

That's a very vague statement. This topic is on scanning of files on an Android device when connecting to MMW. Is that what you see or is the actual sync (an action you take afterwards) slow? If so define slow.
MonkeyStrut
Posts: 97
Joined: Wed May 16, 2012 8:23 pm

Re: Initial scanning very slow on Android

Post by MonkeyStrut »

Hi --

Sorry for late reply.

What I am talking about is the action once I right click on some files (even if a single file) to sync them to the Android device (even when the SD card is totally empty). My MMW is not English but what is written should be something like "scanning" or "initializing". This action is very long, something like 20 minutes! Afther that, the files are sent at the regular speed when transferring files from PC to Anrdoid SD card. The very long process is the one before sending the files.

I hope I am clearer now.

-cheers-
Lowlander
Posts: 56491
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: Initial scanning very slow on Android

Post by Lowlander »

Capture it in a debug log (step 4b) and send the log to support for analysis: http://www.mediamonkey.com/forum/viewto ... ?f=12&t=69
Overzeetop
Posts: 33
Joined: Sat May 06, 2006 8:22 pm

Re: Initial scanning very slow on Android

Post by Overzeetop »

Is anyone else with this problem also getting a "Control 'PnlMain' has no parent window" error if you exit MM during the scan?

Or an "Access violation at address006EDB82 in module 'MediaMonkey (non-skinned).exe'. Read of address 00000040."
Overzeetop
Posts: 33
Joined: Sat May 06, 2006 8:22 pm

Re: Initial scanning very slow on Android

Post by Overzeetop »

FWIW, I did a debug log, and MM is working. Slowly. Very, Very slowly. And, by some magical bonus, it's re-syncing 2/3 of my entire library(including conversions), which is now 3 hours into a 5 hour sync. For only a single song added to the library.
Pathduck
Posts: 111
Joined: Sun Jan 25, 2009 7:26 am

Re: Initial scanning very slow on Android

Post by Pathduck »

I have the same problem. Been having it for some time, up to the point I had given up on sync with MM, and resorting to standard copy of mp3s.
This was a lot of time before the new version which promised to improve sync, so I wanted to give it another go but the problem of 'initializing' never finishing is still there.

My theory is that if you have a lot of files on the Android, maybe especially on an external card, it takes a very long time to scan all the folders. But I don't see why it should need to scan every single file - unless you have set MM to automatically sync (which I don't). For just doing a Send To -> Device it should just plop the files into the folder I choose, right?

I have run both the Debug logging with Dbgview and the Wmlog. The Wmlog was *extremely* slow, up to the point I thought it had just crashed, it took maybe five minutes. Also it was unable to save to c: so you should update the doc that you also need to run Wmlog.exe as administrator to be able to save to C: .

I have also done a sync running Process Monitor to capture output from Mediamonkey.exe. I will attach this as well.

Dbgview+Wmlog:
http://netkups.com/?d=1045b362be1a4

Process Monitor PML file:
http://netkups.com/?d=61c74e660e5a6

Also the following in the debug log is I think a clue:

Code: Select all

00013676	31.81098366	[3612] TAndroidDBHandler.OpenAndroidDB: Used DB: \MediaMonkey\files\mmstore.db.synced	
00013677	31.81105423	[3612] TAndroidDBHandler.OpenAndroidDB: We need request MMA for safe DB copy	
..
00013892	31.93833542	[3612] TAndroidDBHandler.OpenAndroidDB: StoragePrefix = /storage/extSdCard/	
00013893	31.93838882	[3612] TAndroidDBHandler.OpenAndroidDB: Another storage of the same device is opening the same DB, waiting...	
..
00013912	33.90429306	[3612] TAndroidDBHandler.OpenAndroidDB: Waiting for safe android DB copy	
00013913	33.93809509	[3612] TAndroidDBHandler.OpenAndroidDB: Another storage of the same device is opening the same DB, waiting...	
00013914	34.93814850	[3612] TAndroidDBHandler.OpenAndroidDB: Another storage of the same device is opening the same DB, waiting...	
..
00017216	299.40853882	[3612] 2532 DB lock finished, took 120.	
00017217	299.40890503	[3612] WMDM: Finishing synchronization	
As you can see, it takes over four minutes for the sync to complete. The sync itself, once it starts, is over in maybe ten seconds, but it looks like it has to wait for a DB lock for a very long time.

Storageinfo.xml:

Code: Select all

<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><storages version="1.0" storageGuid="bd10bcc2.1.b11c61ab-68cf-4632-a0cc-c510bee2d541"><storage><title>Internal Storage</title><path>/storage/emulated/0</path><info>/storage/emulated/0/MediaMonkey/files/storageInfo.xml</info><type>read-write</type><current>0</current></storage><storage><title>External storage</title><path>/storage/extSdCard</path><info>/storage/extSdCard/MediaMonkey/files/storageInfo.xml</info><type>read-write</type><current>1</current></storage></storages>
My specs:
Windows 7 Professional 64-bit SP1, 8,00GB Dual-Channel DDR3 @ 666MHz, Core 2 Quad Q9550 @ 2.83GHz, 1535MB NVIDIA GeForce GTX 580, Creative X-Fi Audio, ASUS P5E64 WS EVOLUTION.

Samsung S5, Android 4.4.2, kernel 3.4.0-481100


Hope this can be looked at.
Peke
Posts: 17457
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Initial scanning very slow on Android

Post by Peke »

Hi,
I elevated this with team for deep analyze. it could be good if you open support ticket to link this topic with it.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Pathduck
Posts: 111
Joined: Sun Jan 25, 2009 7:26 am

Re: Initial scanning very slow on Android

Post by Pathduck »

I have opened a support ticket: #AQN-884-24890

I also found this case, which might indicate that it is related to having MMA installed?
http://www.ventismedia.com/mantis/view.php?id=11220
Ludek
Posts: 4958
Joined: Fri Mar 09, 2007 9:00 am

Re: Initial scanning very slow on Android

Post by Ludek »

Hi, in the MMW debug log I see that MTP layer frozen for 240 seconds when downloading file \MediaMonkey\files\mmstore.db.synced from the phone, I guess that also Windows Explorer is frozen that time and the file cannot be copied, can you confirm?
Unfortunatelly MTP on Android phones is known as slow to transfer with occassional freezes. My experience was that if I let the phone plugged to the computer for several minutes then the freeze did not happen.

In your case the strange thing is ( I see in the log) that the file \MediaMonkey\files\mmstore.db.synced was already downloaded once and on the second attempt it has frozen, there seems to be also a room for optimization to download it only once on MMW side, because if the \MediaMonkey\files\mmstore.db.synced exists then it means that MMA was not running from the last USB sync, otherwise MMA would process and delete the mmstore.db.synced file.

Tracked as: http://www.ventismedia.com/mantis/view.php?id=12340
Pathduck
Posts: 111
Joined: Sun Jan 25, 2009 7:26 am

Re: Initial scanning very slow on Android

Post by Pathduck »

Hello Ludek,
I can confirm that Windows Explorer also hangs while the initialization is going on.

Is the file mmstore.db needed for me when I just do a basic Send To -> Device ? Is it there because I have MMA installed on the device?
Basically MMW should just pipe the files over to the filesystem on Android, so using some kind of 'sync' files and so on seems overkill... at least for my usage.

Maybe MMW locks the file for transfer in one thread, and then another thread waits for it to finish, which takes a long time. Maybe the locking thread never finishes? Some kind of deadlock issue?

Tonight I will try to uninstall MMA and see if sync improves.
Pathduck
Posts: 111
Joined: Sun Jan 25, 2009 7:26 am

Re: Initial scanning very slow on Android

Post by Pathduck »

I can confirm that deleting MMA from the device make the copy of files start almost immediately when using Send To Device.

So hopefully the problem can be solved so I can have MMA installed as well, since I really like the streaming functions in MMA.

Edit: Fixed in 4.1.6 apparently, please bring it on soon :)
MonkeyStrut
Posts: 97
Joined: Wed May 16, 2012 8:23 pm

Re: Initial scanning very slow on Android

Post by MonkeyStrut »

Hi --

Same thing here. I've tried to use the "send to" with MMA unistalled and it syncs immediately. If I reinstall MMA, the files that have been synced can't show ratings etc. If I do a new "send to" with MMA installed it takes ages as before (it's been more than 15 minutes that I am still on "initializing" while syncing only two files)

-cheers-
theonlyrick
Posts: 61
Joined: Thu Dec 19, 2013 6:06 pm

Re: Initial scanning very slow on Android

Post by theonlyrick »

Killing the explorer.exe process in Task Manager pushes the sync process onto the next stage when it's been hanging at the previous stage for more than a few minutes.

My most successful sync ever (fast, and changed ratings have copied over) is happening right now. For this I connected the phone, browsed the SD card for a few seconds and then started MMW. Within a few seconds it was copying over the rest of my music to my phone - never been that easy before.

Try it!
MonkeyStrut
Posts: 97
Joined: Wed May 16, 2012 8:23 pm

Re: Initial scanning very slow on Android

Post by MonkeyStrut »

Yes, it is true that killing explorer.exe allows the sync to avoid being stuck for at least 15 minutes. I do hope this can be fixed in the future versions because although it now makes the sync doable, it is still far from being an optimum process.

However, a big THANK YOU to theonlyrick!
Post Reply