More work on request profiling.
[bluesky.git] / bluesky / cloudlog.c
index b6ee07f..fb83e02 100644 (file)
@@ -340,6 +340,10 @@ void bluesky_cloudlog_fetch(BlueSkyCloudLog *log)
     if (log->data != NULL)
         return;
 
+    BlueSkyProfile *profile = bluesky_profile_get();
+    if (profile != NULL)
+        bluesky_profile_add_event(profile, g_strdup_printf("Fetch log entry"));
+
     /* There are actually two cases: a full deserialization if we have not ever
      * read the object before, and a partial deserialization where the metadata
      * is already in memory and we just need to remap the data.  If the object
@@ -353,10 +357,6 @@ void bluesky_cloudlog_fetch(BlueSkyCloudLog *log)
         bluesky_string_unref(raw);
     }
 
-    BlueSkyProfile *profile = bluesky_profile_get();
-    if (profile != NULL)
-        bluesky_profile_add_event(profile, g_strdup_printf("Fetch log entry"));
-
     /* At this point all metadata should be available and we need only remap
      * the object data. */
     log->data = bluesky_log_map_object(log, TRUE);