Caideyipi opened a new pull request, #18734:
URL: https://github.com/apache/iotdb/pull/18734

   ## Summary
   - compute tablet device/end-offset ranges once per write range
   - reuse the ranges for aligned memory estimation, MemTable writes, RAM 
snapshots, and TsFileResource time updates
   - preserve the existing IMemTable API for WAL recovery and other callers
   - add a regression test and a manually enabled performance UT
   
   ## Performance
   Manual UT: 
TabletDeviceRangeReusePerformanceTest#tabletDeviceRangeReuseBenchmark
   
   Properties: rows=4,096, devices=64, warmup=1,000, iterations=10,000, 
rounds=7.
   
   | Path | Median CPU | Allocation | splitByDevice calls | getDeviceID calls |
   | --- | ---: | ---: | ---: | ---: |
   | Repeated splitting | 103125.00 ns/op | 13952.00 bytes/op | 280000 | 
1164520000 |
   | Reused ranges | 26562.50 ns/op | 3512.00 bytes/op | 70000 | 291130000 |
   
   CPU decreased 74.24% and allocation decreased 74.83%.
   
   ## Test
   - TsFileProcessorTest#alignedTabletReusesDeviceRangesAcrossWriteStages
   - TsFileProcessorTest#alignedTabletRamCostSnapshotUsesSingleDeviceFastPath
   - TabletDeviceRangeReusePerformanceTest#tabletDeviceRangeReuseBenchmark
   - mvn spotless:apply -pl iotdb-core/datanode
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to