标题: Report of the three cache approaches [打印本页] 作者: milkyjing 时间: 2011-10-23 23:09:02 标题: Report of the three cache approaches
I've just finished the implementation of the chuck cache support. Though, the result turned to be disappointing.
I then analyze all the three cache approaches (file cache, frame cache, chunk cache), and concluded that only the frame cache can bring to practical use.
1. file cache largely depends on the locality of the chunks, if they come in a more random order that performance will be dramatically decreased. Though with relatively small TCAS files, the locality is not an issue, when switching the content of the cache, it will stop the rendering process for a while (this is the biggest problem which should be avoided).
2. chunk cache largely depends on the chunk duration, if a chunk is occupied by many frames (the chunk duration is long), the chunk cache may increase the performance a lot. But this is not the case for practical use (especially with per frame effects whose chunks are likely to be one frame living).
3. frame cache is a good approach, no matter what condition we met. So it is the only one brought into practical use.
作者: milkyjing 时间: 2011-10-23 23:11:17
Just when I'm writing the article, a good idea comes into my mind, what if we combined the chunk cache and file cache technique? Replace the chunk (stored in an AVL or Red-Black tree) with relatively small file blocks?