MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

Limit the number of recent files to 100

Open cbjeukendrup opened this issue 1 year ago • 1 comments

Resolves: #13799

After this PR, starting at the first moment you open another file, the list of recent files will be trimmed to 100 entries.

cbjeukendrup avatar Oct 17 '22 18:10 cbjeukendrup

I found that the long list of recent files causes a huge performance bottleneck when launching MuseScore and when opening a score; this happens in RecentProjectsProvider::recentProjectList(). So let's do the limitation in that method, rather than in any higher level like RecentProjectsModel. That doesn't solve the performance problem completely, but might help a little bit.

(If you open the frontmost file, so that the list of recent files stays the same, the score opens almost instantly; if you open the exact same file but it's somewhere else in the list, so that the whole list of recent files is reloaded and for every recent file the metadata needs to be re-read, it takes like 15 seconds.)

cbjeukendrup avatar Dec 21 '22 15:12 cbjeukendrup

@cbjeukendrup I think, we can close this (since now we have your async-loading optimization)

RomanPudashkin avatar Jul 06 '23 07:07 RomanPudashkin

Yes, let's close it. I'm still not a fan of having an infinitely growing list somewhere, especially if that list contains such unimportant information as recent files while nobody is interested in more than, say, 100 recent files. But I guess we can live with it.

cbjeukendrup avatar Jul 06 '23 14:07 cbjeukendrup