GNOME Bugzilla – Bug 691558
glocalfile: Only check for .hidden files if standard::is-hidden is requested
Last modified: 2013-01-11 17:42:57 UTC
Created attachment 233243 [details] [review] glocalfile: Only check for .hidden files if standard::is-hidden is requested For OSTree, I use Gio and also really care about performance. It's disturbing to see open('.hidden') all over my straces and such. At the moment I have an explicit set of things to query, as opposed to "standard::*", since even before this that also implies an lstat() of the parent directory. This matches up with what we do for all the other attributes. See https://bugzilla.gnome.org/show_bug.cgi?id=587806 --- gio/glocalfileinfo.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
Makes sense to me
Review of attachment 233243 [details] [review]: Patch looks good, assuming you've tested it. Sorry for the careless regression here.
(In reply to comment #2) > Review of attachment 233243 [details] [review]: > > Patch looks good, assuming you've tested it. My test case was: strace -eopen gjs -c 'imports.gi.Gio.File.new_for_path("/etc/passwd").query_info("standard::name,standard::is-hidden", 0, null);' Before, I saw stat(".hidden") - after, no stat. It looks to me like gtk3 has standard::is-hidden in gtk/gtkfilechooserdefault.c:MODEL_ATTRIBUTES, so we should be good.
Er...I meant the reverse of that (without ::is-hidden, no stat, with it, a stat). Anyways it works =)