diff --git a/src/cmd_line.rs b/src/cmd_line.rs index 1856ca5..0770d5f 100644 --- a/src/cmd_line.rs +++ b/src/cmd_line.rs @@ -310,6 +310,7 @@ pub fn run_cmd_line() { || (cur_state == InstState::Editing && timed_update_ready) { let s = status.get(); + // TODO: Update duration format? e.g. 1m 42s remaining print_progress(s.blocks_done, s.blocks_total, querying_start, editing_start); last_update = now; diff --git a/src/commands/clone.rs b/src/commands/clone.rs index 58985ba..0cb0eeb 100644 --- a/src/commands/clone.rs +++ b/src/commands/clone.rs @@ -9,6 +9,9 @@ use crate::utils::query_keys; use crate::time_keeper::TimeKeeper; +// TODO: This and overlay--cache mapblocks in deserialized form. + + fn clone(inst: &mut InstBundle) { let src_area = inst.args.area.unwrap(); let offset = inst.args.offset.unwrap(); diff --git a/src/commands/vacuum.rs b/src/commands/vacuum.rs index 961eb5b..dcf7fff 100644 --- a/src/commands/vacuum.rs +++ b/src/commands/vacuum.rs @@ -9,6 +9,7 @@ fn vacuum(inst: &mut InstBundle) { inst.status.log_info("Starting vacuum."); let start = Instant::now(); + // TODO: Show simple timer in main thread. match inst.db.vacuum() { Ok(_) => { let time = fmt_duration(start.elapsed()); diff --git a/src/map_block/map_block.rs b/src/map_block/map_block.rs index 455d984..221afdb 100644 --- a/src/map_block/map_block.rs +++ b/src/map_block/map_block.rs @@ -81,6 +81,7 @@ impl MapBlock { } pub fn serialize(&self) -> Vec { + // TODO: Use a bigger buffer (unsafe?) to reduce heap allocations. let mut buf = Vec::with_capacity(BLOCK_BUF_SIZE); let mut data = Cursor::new(buf); diff --git a/src/utils.rs b/src/utils.rs index 94e9f58..2eaf4b0 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -11,6 +11,7 @@ use crate::spatial::{Area, Vec3}; pub fn query_keys( db: &mut MapDatabase, status: &StatusServer, + // TODO: Allow multiple names for setmetavar and replaceininv. search_str: Option<&[u8]>, area: Option, invert: bool, diff --git a/todo.md b/todo.md deleted file mode 100644 index 90c3b6f..0000000 --- a/todo.md +++ /dev/null @@ -1,10 +0,0 @@ -Optimizations: - -- Cache deserialized map blocks instead of deserializing each time. -- Overlay: Iterate map blocks in space-filling curve shape to optimize cache usefulness. -- (DONE) Don't re-compress node data/metadata if it isn't changed. -- MapBlock::serialize: Use a big buffer somewhere to avoid heap allocations. - -Todo? - -- Fold area utility functions into the area struct. \ No newline at end of file