avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcrea...@apache.org
Subject svn commit: r1416022 - in /avro/trunk: CHANGES.txt lang/c/src/resolved-writer.c lang/c/tests/performance.c
Date Sat, 01 Dec 2012 17:04:08 GMT
Author: dcreager
Date: Sat Dec  1 17:04:07 2012
New Revision: 1416022

URL: http://svn.apache.org/viewvc?rev=1416022&view=rev
Log:
AVRO-1089. C: Remove performance penalty with resolved writer arrays

The problem was that an internal array wasn't being cleared, and was growing not
just with the size of each test case, but with the number of test cases.
Iterating through that array was causing the slowdown.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/c/src/resolved-writer.c
    avro/trunk/lang/c/tests/performance.c

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1416022&r1=1416021&r2=1416022&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Sat Dec  1 17:04:07 2012
@@ -52,6 +52,9 @@ Avro 1.7.3 (3 December 2012)
     AVRO-1178. Java: Fix typos in parsing document.
     (Martin Kleppmann via cutting)
 
+    AVRO-1089. C: Remove performance penalty when using resolved writer with
+    arrays.  (dcreager)
+
   BUG FIXES
 
     AVRO-1171. Java: Don't call configure() twice on mappers & reducers.

Modified: avro/trunk/lang/c/src/resolved-writer.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/resolved-writer.c?rev=1416022&r1=1416021&r2=1416022&view=diff
==============================================================================
--- avro/trunk/lang/c/src/resolved-writer.c (original)
+++ avro/trunk/lang/c/src/resolved-writer.c Sat Dec  1 17:04:07 2012
@@ -1614,6 +1614,7 @@ avro_resolved_array_writer_reset(const a
 
 	/* Clear out our cache of wrapped children */
 	avro_resolved_array_writer_free_elements(aiface->child_resolver, self);
+	avro_raw_array_clear(&self->children);
 	return 0;
 }
 

Modified: avro/trunk/lang/c/tests/performance.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/tests/performance.c?rev=1416022&r1=1416021&r2=1416022&view=diff
==============================================================================
--- avro/trunk/lang/c/tests/performance.c (original)
+++ avro/trunk/lang/c/tests/performance.c Sat Dec  1 17:04:07 2012
@@ -810,15 +810,15 @@ main(int argc, char **argv)
 		  test_nested_record_value_by_index_resolved_reader },
 		{ "simple array matched schemas", 250000,
 		  test_simple_array },
-		{ "simple array resolved writer", 10000,
+		{ "simple array resolved writer", 250000,
 		  test_simple_array_resolved_writer },
 		{ "simple array resolved reader", 250000,
 		  test_simple_array_resolved_reader },
 		{ "nested array matched schemas", 250000,
 		  test_nested_array },
-		{ "nested array resolved writer", 10000,
+		{ "nested array resolved writer", 250000,
 		  test_nested_array_resolved_writer },
-		{ "simple array resolved reader", 250000,
+		{ "nested array resolved reader", 250000,
 		  test_nested_array_resolved_reader },
 	};
 



Mime
View raw message