Github user otaviojava commented on the issue:
https://github.com/apache/tinkerpop/pull/948
@dkuppitz do you have any benchmarks that you in the project use?
```java
for (int i = 0; i < 100; i++) {
long start = System.currentTimeMillis();
for (int index = 0; index < 100; index++) {
GraphFilter graphFilter = new GraphFilter();
assertFalse(graphFilter.hasEdgeFilter());
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.OUT));
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.IN));
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.BOTH));
//
graphFilter = new GraphFilter();
graphFilter.setEdgeFilter(__.outE("created"));
assertTrue(graphFilter.hasEdgeFilter());
assertEquals(Collections.singleton("created"),
graphFilter.getLegallyPositiveEdgeLabels(Direction.OUT));
assertEquals(Collections.emptySet(),
graphFilter.getLegallyPositiveEdgeLabels(Direction.IN));
assertEquals(Collections.emptySet(),
graphFilter.getLegallyPositiveEdgeLabels(Direction.BOTH));
//
graphFilter = new GraphFilter();
graphFilter.setEdgeFilter(__.outE());
assertTrue(graphFilter.hasEdgeFilter());
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.OUT));
assertEquals(Collections.emptySet(),
graphFilter.getLegallyPositiveEdgeLabels(Direction.IN));
assertEquals(Collections.emptySet(),
graphFilter.getLegallyPositiveEdgeLabels(Direction.BOTH));
//
graphFilter = new GraphFilter();
graphFilter.setEdgeFilter(__.outE("created").has("weight", 32));
assertTrue(graphFilter.hasEdgeFilter());
assertEquals(Collections.singleton("created"),
graphFilter.getLegallyPositiveEdgeLabels(Direction.OUT));
assertEquals(Collections.emptySet(),
graphFilter.getLegallyPositiveEdgeLabels(Direction.IN));
assertEquals(Collections.emptySet(),
graphFilter.getLegallyPositiveEdgeLabels(Direction.BOTH));
//
graphFilter = new GraphFilter();
graphFilter.setEdgeFilter(__.identity().outE("created"));
assertTrue(graphFilter.hasEdgeFilter());
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.OUT));
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.IN));
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.BOTH));
//
graphFilter = new GraphFilter();
graphFilter.setEdgeFilter(__.bothE());
assertTrue(graphFilter.hasEdgeFilter());
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.OUT));
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.IN));
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.BOTH));
//
graphFilter = new GraphFilter();
graphFilter.setEdgeFilter(__.bothE().has("weight",
32));
assertTrue(graphFilter.hasEdgeFilter());
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.OUT));
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.IN));
assertEquals(Collections.singleton(null),
graphFilter.getLegallyPositiveEdgeLabels(Direction.BOTH));
//
graphFilter = new GraphFilter();
graphFilter.setEdgeFilter(__.bothE().limit(0));
assertTrue(graphFilter.hasEdgeFilter());
assertEquals(Collections.emptySet(),
graphFilter.getLegallyPositiveEdgeLabels(Direction.OUT));
assertEquals(Collections.emptySet(),
graphFilter.getLegallyPositiveEdgeLabels(Direction.IN));
assertEquals(Collections.emptySet(),
graphFilter.getLegallyPositiveEdgeLabels(Direction.BOTH));
//
graphFilter = new GraphFilter();
graphFilter.setEdgeFilter(__.bothE("created").has("weight", 32));