[glib: 1/2] docs: Improved the docs of helper getters optimization in g_file_info.c




commit 69be87dda131371503394e830b5f05dc0e73e630
Author: nitinosiris <nitinwartkar58 gmail com>
Date:   Fri May 14 14:06:11 2021 +0530

    docs: Improved the docs of helper getters optimization in g_file_info.c
    
    g_file_info_get_name() gives result faster than g_file_info_get_attribute_byte_string()
    
    Closes #310

 gio/gfileinfo.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c
index cec1b4e56..a27c24626 100644
--- a/gio/gfileinfo.c
+++ b/gio/gfileinfo.c
@@ -46,6 +46,11 @@
  * g_file_query_writable_namespaces() to discover the settable attributes
  * of a particular file at runtime.
  *
+ * The direct accessors, such as g_file_info_get_name(), are slightly more
+ * optimized than the generic attribute accessors, such as
+ * g_file_info_get_attribute_byte_string().This optimization will matter
+ * only if calling the API in a tight loop.
+ *
  * #GFileAttributeMatcher allows for searching through a #GFileInfo for
  * attributes.
  **/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]