On Mon, Feb 23, 2009 at 4:54 PM, Jean-Philippe Bernardy <[email protected]> wrote: > > You can store arbitrary things in the buffer using the > bufferDynamicValueA accessor. > There are examples of usage in Vim keymap and Dired. > You can store strings at the editor level using dynA, in a similar way. > > I find a 10 second delay very huge though; you might benefit from > using Data.Binary. > > Hope this helps, > JP.
After a fair bit of hacking, that turned out to be a workable solution. I just stored ArticleDB in it (don't need anything else). Had a bit of trouble working out the monads and was shortly flummoxed by the Initializable stuff (until I realized that that typeclass was how the case of no-defined-variable was handled, by calling the 'initial' function), but it seems to be working now. And it is, as I suspected, much faster. The buffer switches are about as fast as I could wish, and the backgrounded writes seem to finish tidily enough. But the initial load is still several seconds. How would Data.Binary help there? Is it intended to be a faster version of '(read $ readFile foo) :: ArticleDB)'? -- gwern --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list [email protected] http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---
