07-22-2020, 10:06 PM
@philrandal
I don't disagree with what you said but I was strongly influenced by the documentation language such as "The input cache prefetches queued song files before they are going to be played", "by prefetching several songs at a time..." and "bulk transfers may be faster and more energy efficient than loading small chunks on-the-fly".
I don't think the docs make sense now that I've reread the section and I'll be interested to hear what you make of the code itself.
Practically, I don't notice any particular advantage to the cache when, for example, I play three consecutive tracks in the queue one after the other and then jump back to the first. I'd expect the first track to start quicker because it's still cached. I believe it is because the mem usage kept growing with each track. Didn't notice an improvement.
This suggests to me the cache need not be very big if size confers no advantage.
I can't help also but wonder what and how good the garbage collection routine is ("If the cache grows larger than that, older files will be evicted.")
Somehow a circular buffer would seem like a desirable solution.
Regards,
Kent
I don't disagree with what you said but I was strongly influenced by the documentation language such as "The input cache prefetches queued song files before they are going to be played", "by prefetching several songs at a time..." and "bulk transfers may be faster and more energy efficient than loading small chunks on-the-fly".
I don't think the docs make sense now that I've reread the section and I'll be interested to hear what you make of the code itself.
Practically, I don't notice any particular advantage to the cache when, for example, I play three consecutive tracks in the queue one after the other and then jump back to the first. I'd expect the first track to start quicker because it's still cached. I believe it is because the mem usage kept growing with each track. Didn't notice an improvement.
This suggests to me the cache need not be very big if size confers no advantage.
I can't help also but wonder what and how good the garbage collection routine is ("If the cache grows larger than that, older files will be evicted.")
Somehow a circular buffer would seem like a desirable solution.
Regards,
Kent