[MLton] speeding up type checking by caching
Stephen Weeks
MLton@mlton.org
Sun, 15 Aug 2004 08:19:26 -0700
> Might, I suggest a hack that avoids the hassle of actually dumping
> state to disk. Have MLTon have a --server option that on first
> invocation elaborates a .mlb then forks a child process to do the
> actual compilation. The parent hangs around as a background process.
...
> If you never actually write state to disk you can avoid some of the
> state synchronization issues not to mention the issue of permissions
> associated with a disk cache when there are multiple users.
Interesting idea. But I don't think the difficulty with caching is in
dumping the state -- it's in deciding when it is correct to resume
from the dumped state. Whether the state is dumped to a file or a
forked process doesn't make that any easier or harder. I don't
understand what "state synchronization issues" you mean. And I think
the permission issue is avoided by writing the cache file(s) to
~/.mlton/cache/ (plus this allows different people to cache different
things). One benefit of doing this could be speed, but I want to see
how fast we can go with the disk dump before going this route.