Googles appar
Huvudmeny

Post a Comment On: cbloom rants

"05-26-10 - Windows Page Cache"

2 Comments -

1 – 2 of 2
Blogger won3d said...

I think using FILE_ATTRIBUTE_TEMPORARY has the "avoid filesystem at all costs" behavior, but obviously lacks the cross-invocation persistence. I think what you could do is have an overlay system. Say I want the uncompressed goatse.jpg:

1) If goatse.jpg.tmp exists, use it.

2) Otherwise, make a temporary file, and decompresss goatse.jpg into it.

3) All new temporary files are queued as a really low-priority entity on a shared disk thread. When the disk IO thread is idle, it does MoveFileEx to commit the temporary data to the filesystem. Make sure you flush this queue on program shutdown.

May 28, 2010 at 8:42 AM

Blogger won3d said...

Something that wasn't clear, when you make the temporary file, just use GetTemporaryFilename. When you "commit" it, make a useful name, like goatse.jpg.tmp.

May 28, 2010 at 8:43 AM

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.