The (painfully slow) making of foo_dynfil
Reply #45 – 2010-11-12 12:51:15
Its taking about 1.2 s on my system. Wouldn't it be better if recalculation was done at closing the foobar instead of startup? It's taking about 1.2 s because I made it print the number out. Would you notice if it was not shown in the console as well? The point I'm making is I'm all for having options to tweak this and that, but only if there is some real benefit. If there isn't, why bother? It only confuses people and creates superstitious beliefs about its effects. Also calculation cannot be done at shutdown instead of startup because the precalculated values are never saved to disk, and the closing procedure is slow enough even now so that people reportedly lose their configuration on Windows shutdown, no need to push it further.I'd like (...) ability to switch off the "re-calculation element" (...) on and off (a simple tick box perhaps? - active / de-activate), without having to remove and re-add the component. Why? Sometimes I'll be doing some pretty heavy processing, while also listening to music. During those times I'll often close "unnecessary processes" and I'd like to be able to include foo_dynfil in that camp. I don't know if that's tricky, but it would be ideal if all the values remained in their previous state, so later you could simply switch it back on and then it would recalculate. I have a hard time imagining what kind of heavy processing needs such precautions in this day and age. Nevertheless, this is correct:There is an option to set the interval for recalculation on the preferences page, the first option in the drop down is never. I wouldn't have thought that a single track recalculation would take that much power so it should do that I think you are after. Impact of the recalculation for a single track, like after its play count increases, should be quite neglible - at least compared with opening the next track for playback or redrawing an album list. One more thing, the recalculation times are nicely predictable. If you have set update period as, for example, once per day, you know that if it's 10:20 p.m., you have exactly 1 hour 40 minutes till the next full recalculation at midnight. Also, carpman , re: the new DADADAR thread - I did not make it very clear back then, but the short forms of dates work fine in Dynfil, so [font= "Courier New"]$date_diff(2000-01-01 00:00:00) == $date_diff(2000-01-01 00:00) == $date_diff(2000-01-01 00) == $date_diff(2000-01-01) == $date_diff(2000-01) == $date_diff(2000)[/font].i would need two functions that would help to avoid large title formatting. $weekday() that gives back "Monday, ..., Friday, Saturday, ..." and $calendar_week() that returns number in range of 1 to 52. OK, I'll see about that. Also I take your point about these being rather candidates for global functions, but this component deals with date/time a lot, they wouldn't too out of place here.it'd be nice if I could see the values under the Properties of a song. Yes, indeed. I'll add that in the next version.