apache / apache/hugegraph-computer

improve(core): vertices and edges loading optimization

Open
#288 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Java
Stars
65
Forks
52
PR merge metrics
No merged PRs in 30d

Description

### Feature Description (功能描述)

`ComputerOptions.INPUT_FILTER_CLASS` default value is `DefaultInputFilter`.
`org.apache.hugegraph.computer.core.input.filter.DefaultInputFilter`
```java
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:
```sql
select a, b, c
```
instead of
```sql
select *
```

`org.apache.hugegraph.computer.core.input.hg.HugeVertexFetcher`
```java
@Override
public Iterator 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.