Skip to content

[Java] Improve VectorSchemaRoot.getVector(String name) lookup performance #1148

@jjbskir

Description

@jjbskir

Describe the enhancement requested

The Java VectorSchemaRoot.getVector(String name) can be quite slow if a schema has many vectors. The code currently loops over all the field vectors until it finds the string match. Link to code.

Could we stroe a hash map of the FieldVector String name to the actual FieldVector? Basically the same thing as the fieldVectorsMap that maps the Field to FieldVector. For really wide datasets the trade off of a bit more memory for faster vector lookups would be really nice to have!

Happy to open up a PR with the improvement, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions