diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-05-11 03:53:44 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-05-11 03:53:44 +0000 |
commit | 977d0da9f3bac811793bffa7cf6b605599c9f871 (patch) | |
tree | 9dc028c3c0305d9747e12f655c45b4e2f985e67d /modules/exif/helpers/exif_event.php | |
parent | b706cb69ac7737a550c8f7fff025a6abeb3cfcb6 (diff) |
Refactor the exif module to denormalize the stored data. This way we
have a single exif_record for each item instead of 1 per key. It's
about 5x faster to scan photos this way.
Diffstat (limited to 'modules/exif/helpers/exif_event.php')
-rw-r--r-- | modules/exif/helpers/exif_event.php | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/modules/exif/helpers/exif_event.php b/modules/exif/helpers/exif_event.php index afda70d1..58db2e57 100644 --- a/modules/exif/helpers/exif_event.php +++ b/modules/exif/helpers/exif_event.php @@ -23,11 +23,6 @@ class exif_event_Core { } static function item_before_delete($item) { - ORM::factory("exif_key") - ->where("item_id", $item->id) - ->delete_all(); - ORM::factory("exif_record") - ->where("item_id", $item->id) - ->delete_all(); + Database::instance()->delete("exif_records", array("item_id" => $item_id)); } } |