From 83fce4864ef7f1f220d87ede500b897898e1ed07 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Sun, 14 Feb 2016 16:47:55 +0100 Subject: Initialize files with configurable threadpool This greatly speed-up the initialization of directories with a lot of files inside. --- fuse-httpfs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fuse-httpfs') diff --git a/fuse-httpfs b/fuse-httpfs index 0963501..f68be8f 100755 --- a/fuse-httpfs +++ b/fuse-httpfs @@ -16,12 +16,14 @@ p.add_argument("--max_background", type=int, default=15, help="Maximum number of background threads") p.add_argument("--no_foreground", action="store_true", default=False, help="Fork into background as a daemon") -p.add_argument("--debug", action="store_true", +p.add_argument("--debug", action="store_true", help="Enable debug logging") p.add_argument("--debug-requests", action="store_true", help="Enable python-requests debug logging") p.add_argument("--nothreads", action="store_true", help="Disable fuse threads") +p.add_argument("--poolsize", type=int, default=httpfs.Config.poolsize, + help="Max no. of concurrent http requests") p.add_argument("--timeout", type=float, default=None, help="HTTP connect and read timeout") p.add_argument("--ssl", choices=["default", "system", "none"], @@ -35,6 +37,7 @@ httpfs.Config.timeout = args.pop("timeout") httpfs.Config.mountpoint = args.pop("mountpoint") httpfs.Config.verify = args.pop("ssl") httpfs.Config.system_ca = args.pop("system_ca") +httpfs.Config.poolsize = args.pop("poolsize") kwargs = {} if not args.pop("no_foreground"): kwargs["foreground"] = True -- cgit v1.2.1