[gnome-photos] base-item: Log the time taken to load a local file into a GeglBuffer



commit 25315e9dc4c3b91c14cb9323b05bd8b79b80d7fa
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Nov 23 19:51:28 2017 +0100

    base-item: Log the time taken to load a local file into a GeglBuffer
    
    https://bugzilla.gnome.org/show_bug.cgi?id=781736

 src/photos-base-item.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 9acd9c1..f1c3952 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1399,6 +1399,8 @@ photos_base_item_load_buffer (PhotosBaseItem *self, GCancellable *cancellable, G
   GeglNode *load;
   GeglNode *orientation;
   gchar *path = NULL;
+  gint64 end;
+  gint64 start;
 
   priv = photos_base_item_get_instance_private (self);
 
@@ -1412,8 +1414,14 @@ photos_base_item_load_buffer (PhotosBaseItem *self, GCancellable *cancellable, G
   buffer_sink = gegl_node_new_child (graph, "operation", "gegl:buffer-sink", "buffer", &ret_val, NULL);
 
   gegl_node_link_many (load, orientation, buffer_sink, NULL);
+
+  start = g_get_monotonic_time ();
+
   gegl_node_process (buffer_sink);
 
+  end = g_get_monotonic_time ();
+  photos_debug (PHOTOS_DEBUG_GEGL, "Buffer Load: From Local: %" G_GINT64_FORMAT, end - start);
+
  out:
   g_clear_object (&graph);
   g_free (path);


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