Large lags when sorting fields

I am working with 80K+ files and when I use the column browser to sort songs, it can take up to 4-5 seconds for the files to sort. I am wondering what I may be doing wrong as when I sort the same files in iTunes it does it in milliseconds. Is there some way to make sorting faster?

Get faster hardware?
IMHO: 4-5 seconds for 80.000 plus records isn't slow.
The comparison to iTunes ... well, iTunes does so many things only in its database, perhaps they have a created an index for all the fields.
But what you save there in time you spend when updating that database ... so I would not use iTunes as a benchmark.
Or is this a change request?

I would make a change request if I knew I was doing things correctly. I am using a Ryzen 5 3600 with 64 GB of memory of a ASRock x570 Phantom X. My main drive is a sumsung EVO 970+ and the media is hosted on a 4TB SSD (WD Blue), so, while not cutting edge, I think it should be plenty fast.

So if it is just the limitation of the program or an indexing feature that could be requested, I will just make one. I thought that was what using the Library feature did. I do knowledge that it is a lot of files but when I see iTunes do it in milliseconds there seems to be an incongruity in how long it should take to sort these files.

AFAIK MP3tag is still a 32-bit application. So all GBs of RAM above 4 do not help a lot.
I still think: compare the time it takes iTunes to update the tags (if it does that at all) and how long it takes MP3tag to sort on the fly ...
I don't think that an index in MP3tag would really help as that would have to be built as well.
I don't know - how long does it take Word to sort a column in a table that is 60 pages long?
So the change request would be: make sorting faster, I assume.

It largely depends on the amount of data that is displayed (i.e., number of columns and data in that columns that need to be computed) and the complexity of the sorting criteria in the column definitions.

Is it more performant if you only display the data you're displaying in iTunes?

I was thinking the same thing. For the column you are using to sort, what is the criteria you are using? This complexity could increase you sort time if several fields and/or functions are being used.

I am displaying a lot of information on many columns. I like to try to display as much information as possible because people put weird tags all over the place and it makes it into my files through accessing the databases to tag my files, which is something I have always done, but wonder if I should reconsider doing. I don't think it is feasible to tag everything myself, but I would not have thought everything I have done was feasible. Whether it is rational is another matter.... :blush:

So yes, I display a lot, and really prefer to show all the columns I do. Some of these fields hold the max characters allowed.

Anyhow, ohrenkino mentioned something that I had considered as well, "How long does it take word to sort..." Yes word does take a while to sort large documents. That is why I have accepted this behavior from MP3Tag, because I felt it was a lot to ask. That, and before I was dealing with 15K files max, which made the sort 1-2 seconds. That was much tolerable.

It is interesting that when I use excel to sort the same data it works much faster, so maybe it is how the files are treated.
I know the 64bit upgrade has been considered and is not something that is being explored, but I do wonder if that would help. The files are in an SSD, which is very fast, but not as fast as memory, obviously.

TBH - I am not very fond complaints about time spans of a few seconds.
Before the library was introduced, it took literally hours to load all my files - which got boiled down to just a couple of minutes with the library (and mostly old files).
Those are the dimensions that are worth mentioning, IMHO.

I think that the extended tags dialogue is a much better tool to find strange fields - why have a column for data that appears once in a blue moon (and that probably gets deleted straightaway).
So if the display of superfluous columns slows down the handling, I would do some spring cleaning.
Yet, I see then need to show some columns for technical information like the tag versions, number of covers, length which are neither available for the tag panel nor in the extended tags dialogue.

What is displayed in each column is not the same as what the sorting criteria may be. If you right click on a column header, you can see what field is displayed, and how that column sorts. For example, this is the sort I use for my ALBUMARTISTSORT column. These five fields combined take more time to sort than if I change it to just a single field.
%albumartistsort% %albumsort% %discnumber% %track% %titlesort%

No, it's not related.

In addition, if Sort by is empty, Mp3tag uses the contents of Value for sorting. So if you have something that's more complex than a simple placeholder, you can try using the placeholder at Sort by (e.g., $meta_sep(artist,\\) vs. %artist%)

I'll investigate further and will see if I can make it even more faster. 80.000 files is a lot, but it's not unreasonable to wish for more performance. Computers are dream machines.

1 Like

Thanks for the suggestions and comments. I appreciate it!

I am going out of town for a few days. Once I get back I will look at the suggestions and see if I can make things improve. I did not know some of the things mentioned. To clarify, I am not complaining, I am just wondering if this was the status quo. I think my love for this program has been expressed many times over. An if it was just a couple of seconds, I would not mention it. It is when you stack sorting requests that the delay piles up.

I've significantly improved sorting performance with Mp3tag v3.13.


I did some tests with 200.000 files:
Old version between about 30 seconds, depending on the complexity of the sort criteria.
From 3.13 onwards: 4 seconds for the same (amount of) files and the same criteria.

1 Like

For comparison:

It took my AMD Ryzen 5 3500X with G.SKILL Ripjaws V DDR4 DIMM 3600 Mhz CL16 16 GB (2X8) on Gigabyte X570 Aorus Ultra rev. 1.2 around 6 seconds to sort by just the plain _FILENAME 23500 files, hosted on SSD NVMe M.2 2280 Samsung 980 PRO, with the Windows 10 installed on the exact model of drive bot on a physically different unit

It took my machine the same amount of time to sort these 23500 files also by _FILENAME but with 10 other columns being turned on

But after upgrading Mp3tag to version 3.13 it now needs less than 1 second to the the same job

Hallelujah! :clap: :star_struck: :raised_hands: :heartpulse: :+1:
Wow, what a difference. Now 83K+ sorts in less than 2 seconds! A huge difference! Thank you Florian! I will donate again to continue to support the development of this awesome program. I only wish I could donate more.

Still, there are some suggestions here I have to explore. I have many custom-defined fields and I don't think I am using the sort by fields efficiently. I also think there may be options I am not currently leveraging to make sorting faster. I will explore this and report back if there is anything pertinent to share.

Thanks to everyone for their input on this. As always, it is sincerely appreciated!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.