1
0
Fork 0

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.
This commit is contained in:
radi 2014-10-06 11:23:27 +02:00
parent db22e215a2
commit 82ccaa7429

View file

@ -93,6 +93,10 @@ main(int argc, char** argv)
// use an ArgumentParser object to manage the program arguments. // use an ArgumentParser object to manage the program arguments.
osg::ArgumentParser arguments(&argc, argv); osg::ArgumentParser arguments(&argc, argv);
unsigned expire;
if (arguments.read("--expire", expire)) {
} else expire = 10;
std::string fg_root; std::string fg_root;
if (arguments.read("--fg-root", fg_root)) { if (arguments.read("--fg-root", fg_root)) {
} else if (const char *fg_root_env = std::getenv("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 // Increment the paging relevant number
pager.setUseStamp(1 + pager.getUseStamp()); pager.setUseStamp(1 + pager.getUseStamp());
// and expire everything not accessed for the past 30 requests // and expire everything not accessed for the past 30 requests
pager.update(10); pager.update(expire);
std::string id; std::string id;
std::cin >> id; std::cin >> id;