Skip to content

Conversation

@shuwenwei
Copy link
Member

@shuwenwei shuwenwei commented Jul 21, 2025

For a tsfile with 80,000 devices, the time to read metadata can be reduced from 4.5s to 500ms.

* array size is 2, the first element is the start offset, and the second is the end offset
* @throws IOException io error
*/
public long[][] getDeviceMetadataIndexNodeOffsets(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using long[] may be better for memory consumption?


public class MetadataIndexNode {

private static final double LOG2 = Math.log(2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this magic number used for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used for calculating complexity, it will select the search method according to the complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants