clownxc commented on PR #8472:
URL: https://github.com/apache/hudi/pull/8472#issuecomment-1518672224

   > It is great if we can have numbers to illustrate the gains after the 
patch, like the cost reduction for memory or something.
   
   I did a test based on your suggestion:
   The number of HoodieRecords is `1000 * 100`
   ```java
   WriteStatus status = new WriteStatus(false, 1.0);
   for (int i = 0; i < 1000 * 100; i++) {
     status.markSuccess(mock(HoodieRecord.class), Option.empty());
     status.markFailure(mock(HoodieRecord.class), t, Option.empty());
   }
   System.out.println("status memory: " + 
ObjectSizeCalculator.getObjectSize(status));
   ```
   The memory occupied by `WriteStatus` before optimization is: 125512336 byte
   ```java
   private final List<HoodieRecord> writtenRecords = new ArrayList<>();
   private final List<HoodieRecord> failedRecords = new ArrayList<>();
   ```
   ```
   status memory: 125512336
   ```
   The memory occupied by `WriteStatus` after optimization is: 427408
   ```java
   private final List<IndexItem> writtenRecordIndexes = new ArrayList<>();
   private final List<IndexItem> failedRecordIndexes = new ArrayList<>();
   ```
   ```
   status memory: 427408
   ```
   
   
   


-- 
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: commits-unsubscr...@hudi.apache.org

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

Reply via email to