From 82ccaa74290c464c38687e9366642a412ab01d3a Mon Sep 17 00:00:00 2001 From: radi Date: Mon, 6 Oct 2014 11:23:27 +0200 Subject: [PATCH] add command line option --expire to fgelev, overriding the hardcoded default of 10 if given. This improves performance _a lot_ if massively probing across a bucket border as it prevents constant terrain unloading/reloading. --- utils/fgelev/fgelev.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/fgelev/fgelev.cxx b/utils/fgelev/fgelev.cxx index 3ad0b5850..5d9ae9f84 100644 --- a/utils/fgelev/fgelev.cxx +++ b/utils/fgelev/fgelev.cxx @@ -93,6 +93,10 @@ main(int argc, char** argv) // use an ArgumentParser object to manage the program arguments. osg::ArgumentParser arguments(&argc, argv); + unsigned expire; + if (arguments.read("--expire", expire)) { + } else expire = 10; + std::string fg_root; if (arguments.read("--fg-root", fg_root)) { } else if (const char *fg_root_env = std::getenv("FG_ROOT")) { @@ -184,7 +188,7 @@ main(int argc, char** argv) // Increment the paging relevant number pager.setUseStamp(1 + pager.getUseStamp()); // and expire everything not accessed for the past 30 requests - pager.update(10); + pager.update(expire); std::string id; std::cin >> id;