PDA

View Full Version : MASSIVELY optimized directory scanning


DanDV
2nd November 2001, 21:12
I must agree that directory scanning (i.e. the process of determining song titles and durations) has been blazing fast since v2.75 compared to older versions, but this happens in Winamp 2.77 only when "Read titles" is set to either "Load" or "Play".

When "Read titles" is set to "Display", this process is EXTREMELY slow. The last version with decent speed in this case is 2.666.

To test:
1) Winamp Preferences -> Options -> Read titles on: Display
2) Clear the PE, then load 10 mp3s (careful not to load an m3u with already compiled titles and durations).
3) Watch as the titles and durations get slowly displayed and compare to v2.666.

NOTE: this is winamp.exe's fault, not of any plugins. Swapping in_mp3.dll with the one from v2.666 still reproduces the "bug".

--
Dan D.

peter
2nd November 2001, 21:19
do clean reainstall, etc; make sure that you don't have any third-party input plugins. also try removing some of included input plugins to see if they slow things down.

DanDV
3rd November 2001, 12:25
Peter, when I report a bug, I try to narrow it down to the minimum context that reproduces it. I still think that the problem is related to the .exe. I have clean installs of all version of Winamp after 2.666, with all plugins but in_mp3.dll removed (output plugins aren't necessary, since no song needs to be played). I've reproduced this bug on all hardware configurations I've changed since v2.666 to v2.77 (that's 3 MoBo's, 2 processors, Win95OSR2 vs Win98SE, DirectX vs. no DirectX etc.) and on friends' computers as well.

If the bug doesn't reproduce on your system, there might be two causes:

1) I haven't given precise enough directions as to how to reproduce it.
2) You sistem is of such nature that the bug isn't reproduced.

If you look at my other thread ("7 bugs"), you can see that bug #5, the disappearing cursor w/ PageDown, didn't reproduce on DJEgg's machine, with all his perseverence, but X-Fixer immediately reproduced it.

Regards,
Dan D.

Ultima0
10th November 2001, 03:35
That's a bug? I've seen that on winamps everywhere.. I always thought it just did that on purpose or something.

peter
10th November 2001, 19:37
simple solution: scan all your directories (make sure that Winamp reads all titles) and save playlists for them (no more need to read titles when opening). alternatively, you can switch to Winamp3 beta (database stuff, no more need to check the same file second time).

[edit]
OK, i've reproduced it, looks like updating playlist display is slowing things down.

DanDV
10th November 2001, 21:51
> I've seen that on winamps everywhere..

That means the bug is widely reproducible. Thanks :-]

> I always thought it just did that on purpose or something.

Oh? And what might that purpose be, other than allowing the user to get a cup of coffe while Winamp crawls displaying the list?

> simple solution: scan all your directories (make sure that Winamp
> reads all titles) and save playlists for them

And what happens when you change the ID3 tag of one of the files in the Playlist Editor? You have to go to the directory where that file is, rescan that directory (and how do you do that without losing the list you're working on in the PE?), then save the new info in the playlist.m3u.

And what happens when you dynamically receive or delete new mp3s in/from a directory? Save the playlist and deal with an outdated playlist with removed items? Thankfully, Alt+Del works again ;-)

This is not a practical solution.

I can't help to observe that you prefer to *defend* Winamp.
In this particular case, however, the bug I've described can be fixed in a matter of minutes: just call the "directory scan" routine for the files that can fit in the display window, instead of for all loaded files. BTW, that routine does not scan an entire directory. It only scans the filenames it receives from the "Add file(s) to playlist" modal window.

Regards,
Dan

peter
10th November 2001, 22:27
first, i'm not trying to *defend* winamp. there are several much more serious winamp2 problems i'm aware of and they don't seem to be ever going to be fixed (in winamp2). anyway, i'm not even using winamp2 anymore.
second, 'read titles on load' seems to work much faster so why don't you use it instead ?

And what happens when you change the ID3 tag of one of the files in the Playlist Editor? You have to go to the directory where that file is, rescan that directory (and how do you do that without losing the list you're working on in the PE?), then save the new info in the playlist.m3u.no, you don't. title displayed in playlist will be updated next time when you play that file; you can save the playlist again. if you dynamically receive mp3 files, you can just add them to playlist and save it.