jkolash commented on PR #13039:
URL: https://github.com/apache/iceberg/pull/13039#issuecomment-2944111401

   Stress testing this. For a schema with a schema with 1 million structs I got 
~133ms per iteration when bounding to 100 fields.
   ```java
     @Test
     public void perf(){
       AtomicInteger fieldId = new AtomicInteger(0);
   
       Supplier<Types.NestedField> newStruct = () -> 
required(fieldId.getAndIncrement(), String.valueOf(fieldId.get()),
               Types.StructType.of(required(fieldId.getAndIncrement(), 
String.valueOf(fieldId.get()), Types.IntegerType.get())));
   
       int items = 1000000;
       Schema schema = new Schema(IntStream.range(0, items).mapToObj( (i) -> 
newStruct.get()).collect(Collectors.toList()));
   
       StopWatch sw = StopWatch.createStarted();
       int iterations = 100;
       for (int i = 0; i < iterations; i++) {
         MetricsConfig.boundedBreadthFirstSubSchema(schema, 100);
       }
       sw.stop();
       System.out.println("ms per iteration: "+ 
sw.getTime(TimeUnit.MILLISECONDS) * 1.0/iterations);
     }
   ```
   Output:
   ```
   ms per iteration: 133.08
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to