View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014820 | MMW v4 | Other | public | 2018-05-11 10:53 | 2018-07-10 09:19 |
Reporter | Ludek | Assigned To | |||
Priority | immediate | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | reopened | ||
Product Version | 4.1.21 | ||||
Target Version | 4.1.21 | Fixed in Version | 4.1.21 | ||
Summary | 0014820: Loading time is 60 seconds when Real time protection is active (Windows Defender) | ||||
Description | Users are reporting that RealTime Protection (Windows Defender) causes that MM4 loading time is 60 seconds: http://www.mediamonkey.com/forum/viewtopic.php?f=6&t=89731 , MM5 isn't affected. | ||||
Tags | No tags attached. | ||||
Fixed in build | 1868 | ||||
|
Peke, could you please test whether you can replicate? I have tried and cannot replicate. Start takes 4 seconds on low power Win10 laptop. We could try to report the issue to Windows Defender? Also KB article chould be added/updated until we have more info? I am asking users for debug logs meanwhile (to see whether this is fixable by us). |
|
Based on user log the issue seems related to scripting: http://www.mediamonkey.com/forum/viewtopic.php?f=6&t=89731&p=445085#p445085 I've tried to replicate myself on low power laptop (HP core i3) and after all the Win10 upgrades the first start of MM really takes a long time (13 seconds here), but any subsequent start takes just 3 seconds. Asking more info via ticket/forum... |
|
User confirmed that renaming user scripts folder solves the slow start, to be found which script is causing this... (RDS-991-90091) EDIT: It is caused by this script: RegExp Find & Replace 4.3. http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=28510 Uninstalling it backs to normal startup behaviour. |
|
I installed "RegExp Find & Replace 4.3" and can confirm the issue now. MM starts 2 minutes!! on my low power laptop (HP core i3). It seems that "RegExp Find & Replace 4.3" has many presets (> 250) that are all added as menu items on startup and for each item I see: TEventedAutoObject Created, Class: TSDBMenuItem in the log. i.e. Windows Defender seems to check each OLE object on its creation causing the slowdowns. I am going to find whether it can be somehow eliminated (otherwise the script would have to be modified). |
|
I've been debugging this and when the real time protection in Windows Deffender is active then there is a delay between oleaut32.DispCallFunc callbacks e.g. it is without a delay 10 times and between 11th and 12th call of DispCallFunc there is 0.2 seconds delay. And because this callback is called for each TSDBMenuItem more than 255 items on startup it results in the startup slowdowns. The solutions that I see now is either: - to be fixed by MS in Windows Defender - modify "RegExp Find & Replace 4.3" script to not create all the menu items on startup, but either create them on demand (or not create them at all)? Suggested to author at http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=28510&start=1455#p445137 |
|
I've resolved this issue by moving initialization of startup scripts to a post run action (non-blocking UI thread) in build 1867. This way MM can be used immediately after startup, but some scripts (that takes long time to init) may not be fully initialized yet. This may also result in some bugs when MM is closed during (or before) script init, to be tested/reviewed by scripters. "RegExp Find & Replace" long init issues discussed at: http://www.mediamonkey.com/forum/viewtopic.php?f=2&t=28510&start=1455#p445137 |
|
Also reported to MS: https://answers.microsoft.com/en-us/protect/forum/protect_defender-protect_scanning-windows_10/last-update-of-windows-defender-causes-terribly/c71cc133-5c5f-447e-95fb-e2641085836d?tm=1527000700529 |
|
I have got a report from one user that this new update doesn't help too much with Magic Nodes: "Startup is 1.5 seconds, after that MediaMonkey freezes for 48 seconds". So, I suggest that you revert the old behavior because maybe this approach introduced in 1867 could lead to some another incompatibility with the existing scripts. By the way, I worked on my own workaround for RegExp Find & Replace script and I found the solution. I though at first that the problem is with the Dictionary object that I am using in RegExp script during startup extensively, but it turned out that it is a problem with the MatchCollection object returned by the RegExp.Execute method which is a collection of Match objects. As you can guess, I have used this object during startup extensively as well, but I found a workaround to eliminate its use (at least during startup). However, I am afraid I cannot use the same workaround for Magic Nodes because its regular expressions that I am using for parsing of MN's masks are much complicated than those used in RegExp script. I will see about it when I find a time. |
|
I tested with default install of the last version of Magic Nodes script and the scripts seem to add "only" 100 menu items during start which takes just 1.2 seconds after start. RegExp Find & Replace script adds 255 items and takes 60 seconds, not sure why the difference. For this script my workaround works as MM 1867 starts and is usable while "RegExp Find & Replace" is loading on background for 60 seconds. I guess my workaround is needed until either: a) Microsoft fixes the regression in Windows Defender b) User gets updated scripts Actually I probably should add a progress bar after MM start indicating something like "Loading Magic Nodes Script..." so that users are aware what is happening. Note that even previously (without the Windows Defender update) it took more that 1 second to load the "RegExp Find & Replace" script, i.e. it postponed startup and took 4 seconds instead of 3 seconds -- so I guess that loading the scripts nearly after startup (instead of during startup) still makes sense. |
|
The loading progress added in 1868. + fixed: Selected magic node not restored after restart (regression) |
|
Re-opened: Users are reporting AVs with some scripts with 1867 (Advanced duplicate find & fix, MegaDJ, MiniLyrics, MiniLyrics Embedded): http://www.mediamonkey.com/forum/viewtopic.php?f=6&t=89945 http://mediamonkey.com/forum/viewtopic.php?f=6&t=89857 Fixed in 1868 Test note: App is started and auto scripts are loading within main UI thread again (blocking UI thread until the script is _fully_ loaded as whole), BUT with progress bar indicating which script is loading. So user can see "Loading... RegExpReplace.vbs" and is aware of which script is causing the startup issue. |
|
Verified 1868 |