arcadedb
arcadedb copied to clipboard
Better reuse of space - Part 2
This is the 1nd part of better reusing the space in pages.
- [ ] compress the LinkedList used for edges. New edges are added at the beginning (because the most typical use case is browsing from the latest). We have to come up with a compaction policy there too
- [ ] we need a way to reuse the space in the page instead of checking the space in the last page. At open time, we could easily have a quick scan of the first X pages of a bucket and save the information about how much space left is in each page. When the space is needed (new record, or update with a larger dimension), the deleted space will be reused based on convenience. For example, if a new record requires 5K of space, but the first 10 pages have less then 5K free, and the 11th page has 5K or more, the 11th page should be selected. This means the whole record can be on one page only
Originally posted by @lvca in https://github.com/ArcadeData/arcadedb/issues/1539#issuecomment-2558186606