Closing and reopening MM5 is slow [#16911]

Help improve MediaMonkey 5 by testing the latest pre-release builds, and reporting bugs and feature requests.

Moderator: Gurus

Barry4679
Posts: 2427
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Closing and reopening MM5 is slow [#16911]

Post by Barry4679 »

If I close MM5, and then immediately reopen it, the delay is the range of 12 - 30 seconds as per stopwatch.
I have 70,000 tracks loaded, and the db has been optimised since load up.
The database is on a local disk drive, and the PC has lots of memory.

MM4 close|opens in 3 seconds.

Sometimes MM5 took 20 seconds before displaying the splash screen.

And MM5 still has an exposure where you can invoke multiple concurrent versions, even though "Allow just one instance of MediaMonkey" is checked in Tools|Options|General ... This can happen if you double click twice, when waiting, when nothing seems to be happening.

The delay, and the multi-concurrent version exposure, exposes people to db corruption doesn't it?
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
berni
Posts: 44
Joined: Fri Nov 16, 2007 10:50 am
Contact:

Re: 2265 - Closing and reopening MM5 is slow.

Post by berni »

If I close MM5 and then immediately open it again, the delay is in the barely measurable range and is actually there immediately.
I only have 20,000 tracks, but that doesn't matter because MM is already open and is playing music while the tracks are still loading.
Kind regards. Bernd
My Homepage
Edition Windows 11 Pro Version 21H2
Prozessor 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz 3.60 GHz
Systemtyp 64-Bit-Betriebssystem, x64-basierter Prozessor
MediaMonkey 5.1.0.2819
Barry4679
Posts: 2427
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: 2265 - Closing and reopening MM5 is slow.

Post by Barry4679 »

berni wrote: Sat Aug 29, 2020 5:43 am If I close MM5 and then immediately open it again, the delay is in the barely measurable range and is actually there immediately.
I only have 20,000 tracks, but that doesn't matter because MM is already open and is playing music while the tracks are still loading.
Interesting.
I left MM5 running for a couple hours while busy elsewhere.

I have just closed & re-opened it four times. The delay is fairly consistent now, and is within the 13 - 14 second range.
I am seeing the splash screen almost immediately now.

Last time I had just imported tracks from MM4, and then added a lot of tracks that are not in my MM4 db
I have the options at Tools|Options|Library|MetadataLookup turned off. And I have MediaSharing turned off. ... so none of that background processing should be causing delay.

I had sync'd to my GPM library, but I am signed out of that now, so that should be a factor either.

There was a MM5 icon in the widget at the right end of the task bar ... I don't know what that are is called. The MM5 icon there seemed frozen.

That is not happening now, so maybe that is why I am no longer seeing the long delay before the splash screen.

I have a theory that the two concurrent versions of MM5, that shouldn't be possible, is a factor there also.

I just did a cold start of MM5, after leaving it closed for a couple of minutes ... it took 15 seconds before the Ui was available to me.
MM4 opens in 3 seconds.

I will PM Ludek a couple logs of MM5 open|close, in case these times are not expected.
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Lowlander
Posts: 56574
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: 2265 - Closing and reopening MM5 is slow.

Post by Lowlander »

MM4 seems to take as long as MM5 here, despite MM4 having a very small library. Have you checked how long it takes to close MediaMonkey?

Anyway 15 seconds is nothing I worry about.
Barry4679
Posts: 2427
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: 2265 - Closing and reopening MM5 is slow.

Post by Barry4679 »

Lowlander wrote: Sat Aug 29, 2020 12:10 pm Anyway 15 seconds is nothing I worry about.
I guess so, but it is worth reporting that MM5 takes at least 3 times longer to load than MM4, and large heavy programs such as Excel and Word.
It also takes 50% more time to load than my development IDE, which is an order of magnitude more complex than MM, and is a cross platform Linux facility running under Windows, and therefore not optimised for Windows.

But the issue which prompted this report was where MM5 was taking 30 seconds before it even displayed the splash screen, and over 40 seconds before it was available for use.

It happened again to me today, after rebooting the PC etc. I was testing opening and closing of MM5. It generated an unmanaged exception when closing ... it produced no dump. The widget that appears in the right hand area on the task bar (the one with the play controls) ... it didn't close, and was frozen, ie. no right click menu ... I experienced the large delay when i tried to restart MM5. I will send that debug to Ludek also.
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Lowlander
Posts: 56574
Joined: Sat Sep 06, 2003 5:53 pm
Location: MediaMonkey 5

Re: 2265 - Closing and reopening MM5 is slow.

Post by Lowlander »

Are you still using Cloud Services, then maybe it's causing the slowness: https://www.mediamonkey.com/forum/viewt ... 30&t=97275
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: 2265 - Closing and reopening MM5 is slow.

Post by Ludek »

In the Barry's logs I see:

Code: Select all

00000547	9.60968685	[300] MM5 [10052](R) Current User Scripts Folder: F:\MediaMonkey 5\Portable\Scripts\	
00000548	18.34565163	[300] MM5 [18984](R) TFilesHandlerFile.getFileContent - opening file "F:\Cache\MediaMonkey\precompiledLess.css", took: 15	
00000549	18.34576225	[300] MM5 [18984](R) Retrieving file file:///temp/precompiledLess.css, took: 8765	
i.e. retrieving the precompiledLess.css file took almost 9 seconds on Barry's machine!
Barry, could you please share your precompiledLess.css with me (via PM) and delete the file from its location after the sharing to see whether it resolves the slow start issue for you?
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: 2265 - Closing and reopening MM5 is slow.

Post by Ludek »

FYI: No longer a need for sending me the file, the reason for the slowness is clear now, will be fixed as https://www.ventismedia.com/mantis/view.php?id=16911

Thanks!
Barry4679
Posts: 2427
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: 2265 - Closing and reopening MM5 is slow [#16911]

Post by Barry4679 »

Good, thanks.
Is there anything I can learn from this?
What caused it to get bloated|locked|etc?
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Ludek
Posts: 4959
Joined: Fri Mar 09, 2007 9:00 am

Re: 2265 - Closing and reopening MM5 is slow [#16911]

Post by Ludek »

It was actually a performance regression, as MM was "optimized" some time ago to cache content of folders in resource loader, but it resulted in caching content also of the whole temp dir on start (which was the main peformance leak here). So workaround for you (until 2266 is available) is to clean up your temporary directory.

Anyhow it is good that I saw your log to notice this significant performance leak! ;-)
drakinite
Posts: 965
Joined: Tue May 12, 2020 10:06 am
Contact:

Re: 2265 - Closing and reopening MM5 is slow [#16911]

Post by drakinite »

Woo! I love performance optimizations!
Image
Student electrical-computer engineer, web programmer, part-time MediaMonkey developer, full-time MediaMonkey enthusiast
I uploaded many addons to MM's addon page, but not all of those were created by me. "By drakinite, Submitted by drakinite" means I made it on my own time. "By Ventis Media, Inc., Submitted by drakinite" means it may have been made by me or another MediaMonkey developer, so instead of crediting/thanking me, please thank the team. You can still ask me for support on any of our addons.
Barry4679
Posts: 2427
Joined: Fri Sep 11, 2009 8:07 am
Location: Australia
Contact:

Re: 2265 - Closing and reopening MM5 is slow [#16911]

Post by Barry4679 »

2266 looks really good

The startup speed is good now.
The only things I noticed were:
  • Running MM5 1st time required rights elevation twice (?) during the install
    • I did a lot of stuff: imported 40,000 tracks from MM4, added many more tracks (20,000+), sync'd against my large GPM library, downloaded a few tracks, etc
    • closed MM5 . seemed to close normally
  • Running MM5 for the 2nd time
    • restarted MM5... start was very very slow (30+ seconds ... 20 seconds before splash screen)... I don't know if this was related to all the activity I did, or was related to crud left over from the problems I had with the previous release.
    • stop MM5
  • started debug
  • Run MM5 for 3rd, 4th & 5th times
    • restarted MM5 ... quick, about 5 seconds ... it required rights elevation again??
    • stop and restarted MM5 twice more .... both times quick ... 4 or 5 seconds, did not require rights elevation again
For the next release I will start debug before starting MM5 for the 2nd time, just in case the lengthy restart happens again.
I have the log if Ludek wants to investigate the need for rights elevation on the third run ... it is replacing some firewall rules
Want a dark skin for MM5? This is the one that works best for me .. elegant, compact & clear.
Peke
Posts: 17484
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: 2265 - Closing and reopening MM5 is slow [#16911]

Post by Peke »

Hi,
Regarding slow start on second run: In some occasions I have found out that MM5 is still doing some background jobs to ensure all is saved before close, which relates that main UI is closed but background threads and helping exe are not yet closed. Maybe a Shutting down progress. eg. new MM5 is not started until all previews iterations are closed, so you get starting LAG, Barry?

Note: I seen that behavior only in smoke testing the build where I like you in your post above as normally I do not start/restart MM5 every 5 seconds.
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
Post Reply