in json encoder, replace 2 sub calls w/ 1 hash lookup in heavily called code path...
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 7 Oct 2010 12:57:56 +0000 (12:57 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 7 Oct 2010 12:57:56 +0000 (12:57 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2030 9efc2488-bf62-4759-914b-345cdb29e865

src/perl/lib/OpenSRF/Utils/JSON.pm

index f7cf719..58a7a02 100644 (file)
@@ -219,7 +219,7 @@ sub perl2JSONObject {
     }
 
     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};
     }