Martijn Voncken wrote:
>> It is similar to the normal os operations. You have a listdir and you
>> can open files. But there are major differences:
>
> listdir->ok.
> an abstraction layer opening files can be tricky, please explain.

You try to open a file for writing (you can't open a file for reading
which is not there). If it is impossible to write the file (read only
device or no permissions), the file will be opened for writing in the
overlay dir. 

>> o You can store three types of variables in an object.
>>   1. Stuff you want to be stored as key in the db
>>   2. Stuff you will nevery query on (this will be saved as pickle
>>      inside the db to save time)
>
> I'm not shure if the extra complexity is worth it.

see below, maybe 2 is not needed. But freevo uses some variables noone
will every search on. It would be faster to just put it as user data
as pickle in the main file table.

> The mediadb could be in the main thread.
> But if the ipc stuff is really good i'll change my opinion;) , i'll
> try to catch up.
> metadata parsing should be done in another thread or subprocess of the
> main mediadb

IPC can't be faster than threading because you need to convert
data. But maybe it still works very fast.

>> Next, I plan to have the following tables:
>> 
>> o global: key/values stuff that can be stored as global informations
>>   about the vfs. They do not belong on any files.
>> o dir: basic information about a dir, e.g. dirname and cover
>> o file: basic information about a file belonging to a dir,
>>   e.g. basename, id of the dir, cover, title, mtime
>> o file_video, file_audio, file_image: additinal informations about the
>>   media types
>
> I don't think we really need the file_video,file_image etc.
> I'm not shure if the extra complexity will enhance speed or slow it down.
> metadata-getting now needs 2 selects:
> 1 from attributes and 1 for the file_media table, this will not be
> faster then 100% attributes.
> (title+image from file_table already present)

I'm no database expert. But when you put everything in one table,
wouldn't it be slow? I mean, album, artist, length, etc. Maybe idea
was that is is faster to do one select to get the basic attributes for
all audio files and after that do individual selects on the attribute
table. Maybe I'm wrong. I guess, one file will have about 20
attributes. 

>> Comments?
>
> Done ;).

Thanks


Dischi

-- 
Disc space -- the final frontier!

Attachment: pgpofEDVc8Q4d.pgp
Description: PGP signature

Reply via email to