[ 
https://issues.apache.org/jira/browse/IOTDB-4791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17626475#comment-17626475
 ] 

Liuxuxin commented on IOTDB-4791:
---------------------------------

Test program for TsFileIOWriter::endFile

 

public class TsFileIOWriterEndFileTest {
public static void main(String[] args) throws Exception {
TsFileIOWriter writer = new TsFileIOWriter(new File("test.tsfile"));
for (int deviceIndex = 0; deviceIndex < 1000; deviceIndex++) {
writer.startChunkGroup("root.sg.d" + deviceIndex);
for (int seriesIndex = 0; seriesIndex < 1000; seriesIndex++) {
ChunkWriterImpl chunkWriter =
new ChunkWriterImpl(
new MeasurementSchema(
"s" + seriesIndex, TSDataType.INT32, TSEncoding.RLE, CompressionType.GZIP));
for (long time = 0; time < 10; ++time) {
chunkWriter.write(time, 0);
}
chunkWriter.writeToFileWriter(writer);
}
writer.endChunkGroup();
}
writer.endFile();
}
}

> readChunkMetadataAndConstructIndexTree is too slow for sealing TsFile
> ---------------------------------------------------------------------
>
>                 Key: IOTDB-4791
>                 URL: https://issues.apache.org/jira/browse/IOTDB-4791
>             Project: Apache IoTDB
>          Issue Type: Improvement
>          Components: Core/TsFile
>            Reporter: yusicheng
>            Assignee: Liuxuxin
>            Priority: Major
>         Attachments: image-2022-10-28-16-48-57-842.png
>
>
>  !image-2022-10-28-16-48-57-842.png! 
> you can see this method spend almost half time on Path:<init>, is there any 
> possible to speed up this method?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to