Author Topic: Load file dialog problem (3.0dev)  (Read 102 times)

krege

  • Newbie
  • *
  • Posts: 10
Load file dialog problem (3.0dev)
« on: December 16, 2018, 06:44:55 AM »
Hello!

I found new open file dialog to be very slow. Compare opening with 2.9.0 and 3.0.0dev any folder with rather big amount of files i.e. /usr/bin. I have tasks with ~2k records, stable Ovito opens it in no time, new dev version requires ~0.5 min.

Is there anything I can fix on my side?
« Last Edit: December 16, 2018, 04:38:15 PM by krege »

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 533
Re: Load file dialog problem (3.0dev)
« Reply #1 on: December 16, 2018, 09:17:39 AM »
Hi,

You are using the Ovito version for Linux, right? The current development versions of Ovito use a newer release of the Qt library. This library provides the file selection dialog, and I'm afraid as an application developer there is not much I can do about its behavior. I haven't noticed any performance differences so far, but we'll check if the reduced performance can be observed on our systems too.

There is one thing you should try: In the application settings dialog of Ovito, on the "General" tab, there is a switch that enables an "alternative" file selection dialog. Please check if changing this setting (and restarting Ovito) makes any difference. Let me know if it does.

-Alex

krege

  • Newbie
  • *
  • Posts: 10
Re: Load file dialog problem (3.0dev)
« Reply #2 on: December 16, 2018, 04:37:40 PM »
Linux, right.

There is one thing you should try: In the application settings dialog of Ovito, on the "General" tab, there is a switch that enables an "alternative" file selection dialog. Please check if changing this setting (and restarting Ovito) makes any difference. Let me know if it does.
I needed to mention this before I did try it already. No notable difference.

krege

  • Newbie
  • *
  • Posts: 10
Re: Load file dialog problem (3.0dev)
« Reply #3 on: December 17, 2018, 11:29:29 AM »
Well. I did try rebuild Ovito with system Qt (from latest git). Open file dialog works even slower. I'l try to digg a little deeper.

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 533
Re: Load file dialog problem (3.0dev)
« Reply #4 on: December 17, 2018, 11:46:29 AM »
We just tested the official Ovito binaries (v2.9.0 and v3.0.0-dev from the website) on two different Ubuntu Linux machines, but we could not observe any significant differences in the behavior of the file selection dialog between the two program versions. Both seem to operate reasonably fast (dialog pops up quickly and browsing directories containing 2k files is not associated with waiting times).

This would mean it could be a local problem on your machine. Let us know if you find out more.

krege

  • Newbie
  • *
  • Posts: 10
Re: Load file dialog problem (3.0dev)
« Reply #5 on: December 17, 2018, 02:15:23 PM »
As I understand you test file type. 2.9.0- do test after OK button been pressed and (may be) first file only. 3.0.0+ - during file loading dialog and each file in folder.

On each file in folder:
Code: [Select]
statx(AT_FDCWD, "/home/bear/net/lion/raiddisk/kryzhev/FCC_to_BCC/indent/T300_5mps/bindata/indent.run.300k.T300.S0.05.236600.bin", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_BASIC_STATS, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=12371540, ...}) = 0
stat("/home/bear/net/lion/raiddisk/kryzhev/FCC_to_BCC/indent/T300_5mps/bindata/indent.run.300k.T300.S0.05.236600.bin", {st_mode=S_IFREG|0644, st_size=12371540, ...}) = 0
openat(AT_FDCWD, "/home/bear/net/lion/raiddisk/kryzhev/FCC_to_BCC/indent/T300_5mps/bindata/indent.run.300k.T300.S0.05.236600.bin", O_RDONLY|O_CLOEXEC) = 30
statx(30, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_BASIC_STATS, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=12371540, ...}) = 0
statx(30, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_BASIC_STATS, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=12371540, ...}) = 0
read(30, "8\234\3\0\0\0\0\0{\257\1\0\0\0\0\0\0\0\0\0\2\0\0\0\2\0\0\0\2\0\0\0"..., 16384) = 16384
close(30)
Ovito reads 16k bytes of each file here.
And it is a remote network folder via ssh so such a random reading is too intense.  Continuous downloading is rather fast but not of this kind.
(yes, one more new important detail I missed: non-local location. sorry)

To compare, 2.9.0:
Code: [Select]
stat("/home/bear/net/lion/raiddisk/kryzhev/FCC_to_BCC/indent/T300_5mps/bindata/indent.run.300k.T300.S0.05.1800.bin", {st_
mode=S_IFREG|0644, st_size=12371540, ...}) = 0
lstat("/home/bear/net/lion/raiddisk/kryzhev/FCC_to_BCC/indent/T300_5mps/bindata/indent.run.300k.T300.S0.05.1800.bin", {st
_mode=S_IFREG|0644, st_size=12371540, ...}) = 0
« Last Edit: December 17, 2018, 02:35:31 PM by krege »

Alexander Stukowski

  • Administrator
  • Hero Member
  • *****
  • Posts: 533
Re: Load file dialog problem (3.0dev)
« Reply #6 on: December 19, 2018, 06:38:07 AM »
Right, Ovito itself is not accessing any of the files until you press the "Ok" button of the file selection dialog. It must be the dialog box itself that is scanning the files in the current directory, probably to determine their type for displaying the correct icons and querying other metadata from the file system.

I don't think there is much I can do about it, unfortunately. It's something that happens inside the Qt library, which implements the file selection dialog (QFileDialog class). There must have been internal changes in newer releases of this library, because I did not change how this file dialog is used by Ovito when developing release 3.0. 

I already looked online for more information on this, but couldn't find anything substantial. It looks like there exists an optional flag that can be specified: QFileDialog::DontUseCustomDirectoryIcons. It is supposed to speed up the dialog when browsing network directories under Windows. But it sounds like it only avoids unnecessary accesses to subfolders, not to actual data files in a directory.