Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MU4 Issue] List of recent files grows infinitely #13799

Open
cbjeukendrup opened this issue Oct 17, 2022 · 6 comments
Open

[MU4 Issue] List of recent files grows infinitely #13799

cbjeukendrup opened this issue Oct 17, 2022 · 6 comments
Assignees
Labels
P3 Priority: Low

Comments

@cbjeukendrup
Copy link
Contributor

cbjeukendrup commented Oct 17, 2022

Describe the bug
The list of recent files grows infinitely; it can become unlimitedly long.

Expected behavior
@Tantacrul / @bkunda, what shall we do?

Possible solutions:

  • limit by number, for example max 100 recent files
  • limit by modified date, for example max 1 year since modified. But actually, this is not an option, because it would imply that a file that is opened without modifying and last modified more than 1 year ago will not appear in the list.
  • limit by opened date, but that would require storing the opening dates in the list of recent files, because not all operating systems support "opened" date.

Of course, we don't want to set the limit too low, because a filled home page looks 100x nicer than with just a few scores. On the other hand, in the menu bar > File > Open recent, it doesn't look very nice to have a super long list. Of course, we can cut the File > Open recent list at 10 files and let the Home list grow longer, but I'm not sure whether that's a good idea, and we'll need to limit the list anyway, otherwise we waste kilobytes or eventually megabytes of disk space with just the list of recent files.

@Tantacrul
Copy link
Contributor

100 makes sense. I know we spoke about this before and either it got undone or it fell through the cracks.

@Tantacrul Tantacrul added the P2 Priority: Medium label Oct 17, 2022
@Tantacrul Tantacrul added this to To do in 4.x SHORTLIST via automation Oct 17, 2022
@Tantacrul Tantacrul added this to To do in [MU4.0 - GENERAL] via automation Oct 17, 2022
@ecstrema
Copy link
Contributor

I mean, in any real-world case, can it cause a performance bottleneck?

I mean, if 5 different files are opened every day for 10 years, and the average path length is 40 chars, then it'll take 0.73 MB of memory, which is less than 0.2% of the memory used by MuseScore with a small score opened and no VST loaded.

I'd rather have a convenient way of finding all my files, not just the last 100. In VSCode, I regularly look for "recent" projects that I haven't opened in a year, so definitely further away than 100.

Solutions:

  • Maybe use 1 000? Unless you're a bot, few people will ever open a thousand scores on the same computer, but lots will open 100.
  • Don't put a limit

What do you think? I know it's a very small detail.

@Tantacrul
Copy link
Contributor

I think it becomes unwieldy to think of it as something that should contain that many projects. Practically speaking, it'd be better if one just saved their work in a way that made it easier to find.

One point: we do want to eventually tie 'your scores' to a registered account if you are working online. This isn't the same thing exactly but we may very well add a filter that lets you see all your online scores represented on the desktop app.

@cbjeukendrup cbjeukendrup moved this from To do to In progress in 4.x SHORTLIST Mar 7, 2023
@cbjeukendrup cbjeukendrup added P3 Priority: Low and removed P2 Priority: Medium labels Jul 6, 2023
@cbjeukendrup cbjeukendrup removed this from In progress in 4.x SHORTLIST Jul 6, 2023
@cbjeukendrup cbjeukendrup added this to To do in 4.x LONGLIST via automation Jul 6, 2023
@cbjeukendrup
Copy link
Contributor Author

Lowering the priority, because since #16918 it does not cause big performance problems anymore. I still don't really like the fact that there is an infinitely growing list somewhere (especially since recent files are absolutely unimportant data and most people would only ever care about the 100 most recent files at most). OTOH, as @ecstrema says, the list won't grow that quickly, and of course each entry is only a small amount of data.

@Tantacrul
Copy link
Contributor

The only real solution is pagination, which we should just do at some point soonish. It's cool to have a dynamically loading list... but after a certain number (say 100 scores), we should paginate it.

@cbjeukendrup
Copy link
Contributor Author

@Tantacrul The UI is not the problem. What I have a problem with, is that the list that is stored on the user's computer will theoretically grow infinitely, so this list will contain literally all filenames of the files that the user has ever opened in MuseScore (instead of only the most recent 1000 of them, or whatever number). This is not a very big problem, because even if the user has opened 10000 MuseScore files in their life, that is still manageable for the computer, and the disk space used by a list of filenames is not huge either, but still it's bugging me a little bit to have something that will only grow and never shrink.

@oktophonie oktophonie removed this from To do in [MU4.0 - GENERAL] Jul 28, 2023
@oktophonie oktophonie moved this from To do to In progress in 4.x LONGLIST Jul 28, 2023
@oktophonie oktophonie moved this from In progress to To do in 4.x LONGLIST Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Priority: Low
Projects
Status: In the further future
4.x LONGLIST
  
To do
Development

Successfully merging a pull request may close this issue.

3 participants