]> arthur.barton.de Git - bup.git/commit
Add VFS Node release() and release nodes during restore, after traversal.
authorRob Browning <rlb@defaultvalue.org>
Sat, 12 Apr 2014 19:17:48 +0000 (14:17 -0500)
committerRob Browning <rlb@defaultvalue.org>
Thu, 24 Apr 2014 18:39:46 +0000 (13:39 -0500)
commit88efe14012f3bff2e7a9a248926ddcfc6f39458b
tree79e0aeb8ff3f9f8369624369d46afe551aa60aaa
parentee777400cf624b4f7a24b15614c2b6c745560dcb
Add VFS Node release() and release nodes during restore, after traversal.

Add a release() method to Node that will drop resources that can (and
will) be automatically restored when required -- though restoring the
resources may have a non-trivial cost.  For now, drop the node's
metadata and its children.

Call node.release() in restore-cmd.py after restoring a node.  This
substantially decreases the memory required by a restore because the
whole tree is no longer retained in RAM.

Thanks to Patrick Rouleau <prouleau72@gmail.com> for helping track
down the problem, and proposing a slightly different initial patch to
fix it.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Patrick Rouleau <prouleau72@gmail.com>
cmd/restore-cmd.py
lib/bup/vfs.py