When render is finished, clicking "save" icon to save vray frame buffer into file makes you wait quite a few seconds or even minutes until file save dialog actually opens.
For a simple default cube render, file dialog takes up to 10 seconds, but bigger scene (that uses ~30GB RAM of total 64GB) takes about 4 minutes to open!
Debugging with "sudo strace -f -efile,execve -p $(pgrep vray.bin)" gives output like this (full file attached):
```
strace: Process 95969 attached
[pid 95969] execve("/bin/sh", ["sh", "-c", "test -n "$DISPLAY""], [/* 80 vars */]) = 0
[pid 95969] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 95969] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95969] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/x86_64", 0x7ffee9b332d0) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95969] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls", 0x7ffee9b332d0) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95969] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/x86_64", 0x7ffee9b332d0) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95969] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 95969] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 95969] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 95969] stat("/home/tomas/.config", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
[pid 95969] stat(".", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 95969] getcwd("/tmp/vrayblender_tomas", 4096) = 23
[pid 95969] +++ exited with 0 +++
[pid 95837] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=95969, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
strace: Process 95970 attached
[pid 95970] execve("/bin/sh", ["sh", "-c", "test -n "$DISPLAY""], [/* 80 vars */]) = 0
[pid 95970] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 95970] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95970] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/x86_64", 0x7fff5b285e00) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95970] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls", 0x7fff5b285e00) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95970] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/x86_64", 0x7fff5b285e00) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95970] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 95970] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 95970] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 95970] stat("/home/tomas/.config", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
[pid 95970] stat(".", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 95970] getcwd("/tmp/vrayblender_tomas", 4096) = 23
[pid 95970] +++ exited with 0 +++
[pid 95837] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=95970, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
```
It seems that /bin/sh is called lot's of time (more than 700 times) when clicking "save" icon after render.
File dialog opens instantaneously second time for same render.
Blender for V-Ray 2.79.1 on Kubuntu 17.10 amd64, Ryzen Threadripper 1920X, Patriot M2 NVME.
For a simple default cube render, file dialog takes up to 10 seconds, but bigger scene (that uses ~30GB RAM of total 64GB) takes about 4 minutes to open!
Debugging with "sudo strace -f -efile,execve -p $(pgrep vray.bin)" gives output like this (full file attached):
```
strace: Process 95969 attached
[pid 95969] execve("/bin/sh", ["sh", "-c", "test -n "$DISPLAY""], [/* 80 vars */]) = 0
[pid 95969] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 95969] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95969] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/x86_64", 0x7ffee9b332d0) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95969] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls", 0x7ffee9b332d0) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95969] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/x86_64", 0x7ffee9b332d0) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95969] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 95969] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 95969] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 95969] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 95969] stat("/home/tomas/.config", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
[pid 95969] stat(".", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 95969] getcwd("/tmp/vrayblender_tomas", 4096) = 23
[pid 95969] +++ exited with 0 +++
[pid 95837] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=95969, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
strace: Process 95970 attached
[pid 95970] execve("/bin/sh", ["sh", "-c", "test -n "$DISPLAY""], [/* 80 vars */]) = 0
[pid 95970] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 95970] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95970] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/x86_64", 0x7fff5b285e00) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95970] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/tls", 0x7fff5b285e00) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/x86_64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95970] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/x86_64", 0x7fff5b285e00) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid 95970] stat("/usr/ChaosGroup/V-Ray/Standalone_for_linux_x64/lib/linux_x64/gcc-4.4", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 95970] openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 95970] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 95970] openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 95970] stat("/home/tomas/.config", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
[pid 95970] stat(".", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 95970] getcwd("/tmp/vrayblender_tomas", 4096) = 23
[pid 95970] +++ exited with 0 +++
[pid 95837] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=95970, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
```
It seems that /bin/sh is called lot's of time (more than 700 times) when clicking "save" icon after render.
File dialog opens instantaneously second time for same render.
Blender for V-Ray 2.79.1 on Kubuntu 17.10 amd64, Ryzen Threadripper 1920X, Patriot M2 NVME.
Comment