Auto-Rating (variables) component
Reply #6 – 2008-08-19 17:11:55
But clearly fb2k has no problem reading from a DB and everytime you play a track the playcount changes and fb2k can deal with such changes. Yeah, because in case of %title%, %rating% or %isplaying%, the part of fb2k which changed that field can send a change notification to just one (or several tracks). With time based formula, you either issue 10000+ such notifications each second for great performance or suffer from the repaint problems.What I'm suggesting is pretty much the same, except that the component would offer up a %calculation% for fb2k to read, and the frequency of updates from the database is something that could be negotiated to avoid the core problem. [...] Wouldn't this bypass the re-paint problems that Peter was talking about? Yes, you understand the problem well. Such a solution would work - it could be either a manual "Recalculate" command, it could happen automatically "when computer is idle" in the background, ...An alternative way around this is to include a form of system time which = %system day%. Date-based autoratings schemes like "hotness" and foo_DAR only need system day. Would that solve the constant update problem? Partialy, but it's a bad design anyway. Because you couldn't link %system day% to a particular track(s), the refresh command would need to be send about all 10000+ tracks each midnight, even for people who don't care at all.