View Issue Details

IDProjectCategoryView StatusLast Update
0013666MMW 5Generalpublic2022-09-14 14:39
Reporterrusty Assigned To 
PriorityurgentSeverityfeatureReproducibilityalways
Status feedbackResolutionopen 
Target Version5.2 
Summary0013666: Plugging in a drive eats up CPU resources due to automated scanning
DescriptionWhenever a user plugs a new device into MM, MM takes some time to scan it which can be a CPU intensive process. My recollection is that we did this for usability since we didn't want users to get into a situation where they didn't know how to get MM to scan the device.

A user suggested that we could satisfy both requirements. This could be done by having something like the following appear when a new device is plugged in that doesn't have a profile configured:

'A new device "<DeviceName>" was plugged in. Do you want MediaMonkey to Scan the content?
( ) Scan for media and include content in the library. (---> Scan dialog appears)
(o) Scan for media, but don't include it in the library (treat this as a portable device).
 . . [ ] Don't ask again (always do this)
[OK] [[Cancel]]'
Additional InformationOMZ-889-71450
TagsNo tags attached.
Fixed in build

Relationships

related to 0009913 closedLudek MMW v4 Win 8: CPU utilization goes to 70-80% when external USB drive connected 
related to 0013191 closedLudek MMW v4 Scanned external HDDs in MMW should be excluded from Portable devices list 

Activities

jiri

2016-11-18 10:18

administrator   ~0046188

I think that in most cases scanning of a portable device into Library doesn't make much sense and so offering this option seems to be unnecessary.

As for the high CPU due to _reading_ of device content - I wonder whether we shouldn't make this happen only on request, i.e. either:
 - When user clicks on the device.
 - If auto-sync for the device is enabled.

Note that this approach would mean that e.g. playcounts aren't automatically synced from MTP devices, since the full device scan is needed there. I guess that it isn't a big deal though, since such devices are less common today and if needed, auto-sync can be enabled to perform this step.

Ludek

2016-11-18 13:35

developer   ~0046190

Last edited: 2016-11-18 13:46

Note that there is already checkbox (on the Summary page of the device profile):

[x] Scan as soon as the device is connected

It is enabled by default, so we could disable it by default for MM5.

Note that if it is disabled then the device is scanned on demand (i.e. once it is browsed or once sync is initialized)

rusty

2016-11-21 22:25

administrator   ~0046205

Enabling reading of portable media by default has one set of problems (CPU usage) but disabling it has an equally bad or perhaps worse problem (out of date data that users will have no idea why it's out of date).

Jiri's suggestion is also problematic because MTP data will be out of date (initially) and again users won't realize why.

So I'd suggest either leaving as is OR having a mechanism that prompts the user to change the default behavior so that they realize it can be changed i.e.
a) leaving it enabled by default but giving users an option to change the device setting to disable scanning via a popup dialog that only appears for the first time for that device.
b) leaving it disabled by default (except if sync is enabled) but giving users an option to enable scanning via a popup that appears when the user clicks the device.

Thoughts?

jiri

2016-11-22 10:58

administrator   ~0046211

IMHO that MTP limitation isn't a big deal - it's only about MTP devices, i.e. something that will probably be in quite a decline (compared to Androids, iPhones, ...) and so won't negatively influence user's experience in most cases.

If you are really concerned about too many support queries, we could modify the string to something like (for MTP devices only, since it doesn't make sense for others?):

[ ] Scan as soon as the device is connected (recommended for automatic bi-di sync)

Since it's on device Summary page, it should be quite easy to find for anybody having a problem.

We could also consider selecting the default value automatically, i.e. disabled for all devices, except for MTP devices connected over WMDM (i.e. not mass-storage devices connected over WMDM).

rusty

2016-11-22 22:45

administrator   ~0046218

Aren't all Android devices treated as MTP devices?

jiri

2016-11-23 14:03

administrator   ~0046223

Yes, they are, I thought that we would exclude Androids.

That said, it's probably a bit of a hack, I'd prefer disabling it for all devices.

Ludek

2016-11-23 14:05

developer   ~0046224

Last edited: 2016-11-23 14:08

What about to keep the "Scan on connect" disabled by default, but once user connects Android device (and scan is initialized) then MM5 would show something like:

MediaMonkey for Android is not installed on the device
We recommend to install it for faster scannning and better metadata sync blabla bla

[x] Do not show this again

?

i.e. MMW would advertise MMA this way

rusty

2016-11-23 21:28

administrator   ~0046233

That would work. i.e. disable for all devices (unless sync is enabled for the device) but give an option (per-device) to enable scanning. e.g.

If Android detected:
An Android device was detected. Would you like to manage the media contents of this device from MediaMonkey?

Note: It's recommended that you first install and run MediaMonkey for Android on your device for a faster/smoother experience.

[Yes. Scan as soon as the device is connected] [No]

[x] Don't show this again.


If other mtp device:

A portable storage device was detected. Would you like to manage the media contents of this device from MediaMonkey?

[Yes. Scan as soon as the device is connected] [No]

[x] Don't show this again.

-------------------

Is that what you were thinking?

Ludek

2016-11-23 22:44

developer   ~0046236

Last edited: 2016-11-23 22:45

Yes, I guess that something like this would work fine.

Just to ensure: by "sync is enabled for the device" you mean the '[x] Sync to this location' option in MMA that corresponds to the visible state in MM4?
In MM4 it is in Options > Portable Device Sync > Show column

But in MM5 we haven't added this Options sheet at all and all profiles are accessible under the Storage/Devices node.
I guess that the visibility option is no longer needed and the [Yes. Scan as soon as the device is connected] would just activate the [x] Scan as soon... checkbox, right?

jiri

2016-11-24 15:16

administrator   ~0046241

Just, as we are slowly getting rid of modal windows, I think that it would make sense to design the UI in a non-blocking way. E.g., when a device is connected for the first time, there's a Toast message shown with 'Show' button leading to the Summary page of the device. The Summary page would contain the 'install MMA' message with 'Install' and 'Dismiss' buttons. Thoughts?

rusty

2016-11-25 18:12

administrator   ~0046265

Re. 'sync is enabled for this device' I was referring to whether the sync profile is enabled in MMA / Shown in MMW. You're right, in the absence of this setting, we'd have to 'disable for all devices except those for which have been configured to 'Scan as soon...'.

Re. modal windows: We've already implemented such a timed-popup in MM5, so yeah--it would make sense to use the same control all the time.

Side note: We probably have to figure out how to deal with the clutter of devices that will result in MM5 due to the absence of this setting (on my screen I have to scroll through 48 devices to find a device that I want to configure :-( and it's all the more difficult because they appear as large icons rather than as a list). Any ideas?

jiri

2016-11-28 12:27

administrator   ~0046283

Assigning to Ludek to implemented the agreed items.

As for the visibility of all devices - I think that we really need a way how to select which devices to show. Maybe each device could have a 'Hide' context menu command? Possibly also 'Delete this device profile' could be useful? And, in order to re-show hidden devices, we should show them somewhere - maybe in the Media Tree Options sheet? This sheet could also be used to e.g. show/hide UPnP server on the (most local) network, etc.

Ludek

2016-11-28 13:23

developer   ~0046286

Last edited: 2016-11-28 13:25

Re: the visibility:

What about adding one more level to the tree?

i.e.
[-]-Storage/Devices
--[+] Cloud storages (3)
--[+] USB connected devices (1)
--[+] Disconnected devices (47)
--[+] Remote sync capable (2)
--[+] All profiles
--[+] Disabled profiles (2)


BTW: There is already the "Delete" command in the context menu to remove the corresponding device/storage profile

But probably we should open another (separate) issue to track the device/storage profile visibility issues?

rusty

2016-11-29 20:32

administrator   ~0046309

Opened #13697 to track visibility issues, and assigned this back to ludek.

Ludek

2016-12-15 22:35

developer   ~0046547

Last edited: 2016-12-15 22:35

The visibility issues were resolved as #13697

The default for the [ ] Scan as soon... checkbox was changed to unchecked (in build 2046).

Re messages:
Jiri wrote: Toast message shown with 'Show' button leading to the Summary page of the device. The Summary page would contain the 'install MMA' message with 'Install' and 'Dismiss' buttons. Thoughts?

Rusty wrote: We've already implemented such a timed-popup in MM5, so yeah--it would make sense to use the same control all the time.

So how the summary page and the toast message should look?