Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve(core): vertices and edges loading optimization #288

Open
diaohancai opened this issue Nov 22, 2023 · 0 comments
Open

improve(core): vertices and edges loading optimization #288

diaohancai opened this issue Nov 22, 2023 · 0 comments
Labels
feature New feature

Comments

@diaohancai
Copy link
Contributor

diaohancai commented Nov 22, 2023

Feature Description (功能描述)

ComputerOptions.INPUT_FILTER_CLASS default value is DefaultInputFilter.
org.apache.hugegraph.computer.core.input.filter.DefaultInputFilter

public class DefaultInputFilter implements InputFilter {

    @Override
    public Vertex filter(Vertex vertex) {
        vertex.properties().clear();
        return vertex;
    }

    @Override
    public Edge filter(Edge edge) {
        edge.properties().clear();
        return edge;
    }
}

Load all properties first, then clear.

Could we specify some properties when loading vertices or edges? May could improve performance.
Just like mysql:

select a, b, c

instead of

select *

org.apache.hugegraph.computer.core.input.hg.HugeVertexFetcher

    @Override
    public Iterator<Vertex> fetch(InputSplit split) {
        Shard shard = toShard(split);
        return this.client().traverser().iteratorVertices(shard,
                                                          this.pageSize());
    }

But it seems that the traverser api does not yet support specifying some properties to load vertices or edges on the server side.

@diaohancai diaohancai added the feature New feature label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant