[f-spot] Prepare thumbnails during import, it's I/O bound anyway.



commit 5a2964f4dd906ccab018a3003360d93507e4f3d0
Author: Ruben Vermeersch <ruben savanne be>
Date:   Sat Jun 5 21:21:16 2010 +0200

    Prepare thumbnails during import, it's I/O bound anyway.

 src/Import/ImportController.cs |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/Import/ImportController.cs b/src/Import/ImportController.cs
index 969b9ee..7e9a484 100644
--- a/src/Import/ImportController.cs
+++ b/src/Import/ImportController.cs
@@ -256,15 +256,6 @@ namespace FSpot.Import
 
         void FinishImport ()
         {
-            ThreadAssist.SpawnFromMain (() => {
-                // Generate all thumbnails on a different thread, disposing is automatic.
-                var loader = ThumbnailLoader.Default;
-                foreach (var id in imported_photos) {
-                    var uri = store.Get (id).DefaultVersion.Uri;
-                    loader.Request (uri, ThumbnailSize.Large, 10);
-                }
-            });
-
             ImportThread = null;
             FireEvent (ImportEvent.ImportFinished);
         }
@@ -335,7 +326,9 @@ namespace FSpot.Import
                 store.Commit (photo);
             }
 
-            // FIXME: import xmp crap
+            // Prepare thumbnail (Import is I/O bound anyway)
+            ThumbnailLoader.Default.Request (destination, ThumbnailSize.Large, 10);
+
             imported_photos.Add (photo.Id);
         }
 



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