Erik Massop wrote:
In my medialib it costs about 20 microseconds per returned entry per
constrained property. The raw test results are here:
http://www.math.leidenuniv.nl/~emassop/xmms2-sourcepref-timing .

Not that bad. Lets pull it in.

[]

Pshuffle's and queue's functionality are replaced by the type attribute
to idlist. The daemon only modifies the playlist if the value is
"pshuffle" or "queue". The user can also set a different value. For
instance I used to have "by-album" which caused a little client to
remove entries that were played a while ago and add new songs on a
per-album basis.

Oh, the strcmp was well hidden inside the patch. And the comment didn't
say anything about it. Then it is cool. I think it should have a
different name, "type" is very generic, and easily confused with
collection-operator-type. "on-change-hook" springs to mind, but there
are probably better names. With collection attributes as proper xmmsv_t
we could even nicely contain its arguments in there:

coll.attributes['on-change-hook'] = {func: "partyshuffle", upcomming: 4,
history: 1}

or something like that.


[]

Prepared statements are usually nice, but is it worth it?

Is it worth what?

Added code complexity.

The time-improvements are quite small but something nonetheless. It
saves me about 1.5 seconds on addpath and 2 seconds or rehash. Again
see http://www.math.leidenuniv.nl/~emassop/xmms2-sourcepref-timing .

Are those differences outside normal variation? Also are you sure the
improvement is from actual caching of statements and not the change from
callback based (exec) API to the iterative (prepare/step)?

Also sqlite3_prepare_v2 maybe?

That can easily be done. (The only difference is in the detailed
error-reporting, which isn't used anyway. It just returns FALSE.)

I just seems to recall that the sqlite documentation says something about new programs shouldn't use the old API.

 anders

--
_______________________________________________
Xmms2-devel mailing list
Xmms2-devel@lists.xmms.se
http://lists.xmms.se/cgi-bin/mailman/listinfo/xmms2-devel

Reply via email to