[Opensrf-commits] r2030 - trunk/src/perl/lib/OpenSRF/Utils (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Oct 7 08:57:57 EDT 2010
Author: erickson
Date: 2010-10-07 08:57:56 -0400 (Thu, 07 Oct 2010)
New Revision: 2030
Modified:
trunk/src/perl/lib/OpenSRF/Utils/JSON.pm
Log:
in json encoder, replace 2 sub calls w/ 1 hash lookup in heavily called code path. we lose some abstraction, but it's probably worth it here
Modified: trunk/src/perl/lib/OpenSRF/Utils/JSON.pm
===================================================================
--- trunk/src/perl/lib/OpenSRF/Utils/JSON.pm 2010-09-28 17:35:26 UTC (rev 2029)
+++ trunk/src/perl/lib/OpenSRF/Utils/JSON.pm 2010-10-07 12:57:56 UTC (rev 2030)
@@ -219,7 +219,7 @@
}
if($ref ne 'HASH' and $ref ne 'ARRAY') {
- $ref = $pkg->lookup_hint($ref) if $pkg->lookup_hint($ref);
+ $ref = $_class_map{classes}{$ref}{hint} || $ref;
$jsonobj = {$JSON_CLASS_KEY => $ref, $JSON_PAYLOAD_KEY => $jsonobj};
}
More information about the opensrf-commits
mailing list