Hi all, Currently when I want to update an existing TDB, I simply open it using "memory-mapped file" mode (I'm using 64-bit) and then call "model.createResource()" repeatedly which will get reflected onto the TDB as the program runs.
I'm quite curious about the details behind the scenes. 1. According to my understanding: when I open the existing TDB, it does not load any data from disk just yet. it only loads on-demand whenever an existing node needs to be referenced (for instance, let's say the existing TDB has the triple "A p B" and I'm trying to add "A p C". This requires A to be loaded in memory first). In this case, if I'm not referencing any existing nodes, there's no need to load anything from the existing TDB at all. 2. Even though the TDB is loaded in "memory-mapped file", does the program really have to periodically write to disk (assuming there's still enough physical memory)? Can somehow the program write only when it runs out of physical memory? Additionally, after writing the disk, can the corresponding data in memory be freed (or maybe keep a cache of much smaller set)? Any comments are welcome. Thanks! -Zhiyun
