On Wed, Jan 14, 2004 at 05:41:59PM +0100, Dirk Meyer wrote: > That will be a problem. To have that attribute, you need to check all > items in the dir/playlist. E.g. you enter a directory with 10 subdirs, > each containing 200 mp3 files, you will need to access 11 mmpython > cache files when entering the dir. A playlist containing 100 items in > different dirs will result in reading 100 cache files. A big cache > file takes about 0.4 secs to load.
Well, it would be annoying to do it every time, but doing it once or when 'freevo cache' is called should be fine, right? > That's the biggest problem with the current mmpython cache stuff. It > may be a good idea to store metainfo for files/playlists, > too. E.g. when you first see the directory, you don't have that > info. After entering once, freevo will have the extra infos stored > somewhere (or running freevo cache will also generate that info). > > > However, the problem I'm running in to is that neither playlist nor > > directory seem to "know" about this mmpython info, and I don't know > > where to grab the information from. > > No, since both don't have infos. They only create items which know how > to get the info for themself (item.py:Item.set_url). > > So we need a way to get informations about playlists/directories > _without_ scanning all files in it during runtime. > > And now we are back to the 'store metadata for items' idea :-) Storing the data is perfectly reasonable, but conceptually, we need to store "directory" properties somehow, whether in mmpython or in a db, but we need to treat directories as things with properties as well. It'll be marginally faster using SQL because you could do a "SELECT sum(length) FROM mmpython WHERE path='mypath'" for a directory, but it's still a waste of time to do it that way when we could just do: getdirlength(path) from mmpython and have mmpython store a record for the full path. I mean, as it stands mmpython seems to store a single file for a directory, so adding one extra line to those with the directory summary wouldn't be too difficult? Aubin ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel
