newdb: Speed up set_metadata() by not committing the db after individual field writes