[interchange-cvs] interchange - danb modified 2 files

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Tue Aug 6 14:53:00 2002


User:      danb
Date:      2002-08-06 18:52:33 GMT
Modified:  .        WHATSNEW
Modified:  code/UI_Tag import_fields.coretag
Log:
* [import_fields]: Performance enhancement: use set_slice() to update all
  fields in a record at once when importing files.

Revision  Changes    Path
2.32      +7 -0      interchange/WHATSNEW


rev 2.32, prev_rev 2.31
Index: WHATSNEW
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/WHATSNEW,v
retrieving revision 2.31
retrieving revision 2.32
diff -u -r2.31 -r2.32
--- WHATSNEW	5 Aug 2002 04:05:39 -0000	2.31
+++ WHATSNEW	6 Aug 2002 18:52:33 -0000	2.32
@@ -152,7 +152,14 @@
 * Support for the Mainstreet Credit Verification Engine (MCVE) added.
   Written, tested, and donated by Tom Friedel <tom@readyink.com>.
   Thanks, Tom!
+=20
=20
+UI
+--
+
+* [import_fields]: Performance enhancement: use set_slice() to update all=
=20
+  fields in a record at once when importing files.
+=20=20
=20
 --------------------------------------------------------------------------=
----
=20



1.3       +10 -1     interchange/code/UI_Tag/import_fields.coretag


rev 1.3, prev_rev 1.2
Index: import_fields.coretag
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/code/UI_Tag/import_fields.coretag,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- import_fields.coretag	24 May 2002 20:58:55 -0000	1.2
+++ import_fields.coretag	6 Aug 2002 18:52:33 -0000	1.3
@@ -251,11 +251,20 @@
 			}
 		}
 		for ($i =3D 0; $i < $idx; $i++) {
-			$set[$i]->($k, $f[$i]);
 			if ($opt->{cleanse}) {
 				delete $keys{$k};
 			}
 		}
+		if(@names) {
+			my %hash;
+			@hash{@names} =3D @f;
+			$db->set_slice($k, \%hash);
+		}
+		if($@) {
+   			my $msg =3D ::errmsg("error on update: %s", $@);
+			::logError($msg);
+   			$out .=3D $msg;
+   		}
 		$count++;
 	}
 	if ($opt->{cleanse}) {