Ticket #3445 (closed: fixed)
Implement a DiskMRU class
Reported by: | Janik Zikovsky | Owned by: | Janik Zikovsky |
---|---|---|---|
Priority: | critical | Milestone: | Iteration 30 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Wenduo Zhou |
Description
This class is to be used by the file-back-end of MDEventWorkspace, but build it more generally. This is a class that:
- Limits the amount of objects in the cache to a certain amount of memory (not a fixed number of items) since objects will have varied sizes.
- Keeps the most recently used objects in memory.
- Delegates the loading/saving of the data to the object itself (because the object will stay in memory but its contents won't).
- Use an ISaveable simple interface to delegate the loading and saving.
- Each ISaveable tells the the DiskMRU when it needs to load itself so that the MRU :
- Marks it as recently used.
- Frees some memory by writing out another one.
Also, the DiskMRU should:
- Combine write operations in "blocks" so that seeking is minimized.
- A certain minimum write size will be accumulated before writing to disk.
- Objects will be sorted by their file index position before writing.
Change History
comment:9 Changed 9 years ago by Janik Zikovsky
- Status changed from accepted to verify
- Resolution set to fixed
In [13687]:
comment:10 Changed 9 years ago by Wenduo Zhou
- Status changed from verify to verifying
- Tester set to Wenduo Zhou
comment:11 Changed 9 years ago by Wenduo Zhou
Unit test passed.
It is better to have these two functions in unit test, too. (1) defragFreeBlocks() (2) getMemoryStr()
comment:13 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 4292
Note: See
TracTickets for help on using
tickets.