Skip to content

Commit

Permalink
Disable vertex cache for cardinality checks
Browse files Browse the repository at this point in the history
Signed-off-by: Clement de Groc <[email protected]>
  • Loading branch information
cdegroc committed Aug 19, 2024
1 parent 94c55f0 commit c7253ff
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ private class JanusGraphVertexFeatures implements VertexFeatures {

@Override
public VertexProperty.Cardinality getCardinality(final String key) {
StandardJanusGraphTx tx = (StandardJanusGraphTx)JanusGraphFeatures.this.graph.newTransaction();
StandardJanusGraphTx tx = (StandardJanusGraphTx)JanusGraphFeatures.this.graph.buildTransaction()
.dirtyVertexSize(0)
.vertexCacheSize(0)
.readOnly()
.start();
try {
if (!tx.containsPropertyKey(key)) return tx.getConfiguration().getAutoSchemaMaker().defaultPropertyCardinality(key).convert();
return tx.getPropertyKey(key).cardinality().convert();
Expand Down

1 comment on commit c7253ff

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: c7253ff Previous: 1dd27f5 Ratio
org.janusgraph.JanusGraphSpeedBenchmark.basicAddAndDelete 13376.816839898282 ms/op 12572.478016904271 ms/op 1.06
org.janusgraph.GraphCentricQueryBenchmark.getVertices 905.1235528654151 ms/op 916.7180875491978 ms/op 0.99
org.janusgraph.MgmtOlapJobBenchmark.runClearIndex 216.1994245423913 ms/op 216.70551974746377 ms/op 1.00
org.janusgraph.MgmtOlapJobBenchmark.runReindex 342.76571369115385 ms/op 350.7121621157692 ms/op 0.98
org.janusgraph.JanusGraphSpeedBenchmark.basicCount 262.05357473066675 ms/op 284.39062519340416 ms/op 0.92
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesAllPropertiesWithAllMultiQuerySlicesUnderMaxRequestsPerConnection 5130.281303056476 ms/op 5277.968037055716 ms/op 0.97
org.janusgraph.CQLMultiQueryBenchmark.getElementsWithUsingEmitRepeatSteps 17409.60304184039 ms/op 17970.33073737809 ms/op 0.97
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesMultiplePropertiesWithSmallBatch 21091.439438377776 ms/op 20380.3642292297 ms/op 1.03
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.vertexCentricPropertiesFetching 59163.61025553333 ms/op 58827.957386466675 ms/op 1.01
org.janusgraph.CQLMultiQueryDropBenchmark.dropVertices 1567.9321774864939 ms/op 1611.440189281238 ms/op 0.97
org.janusgraph.CQLMultiQueryBenchmark.getAllElementsTraversedFromOuterVertex 8771.485649283639 ms/op 8713.925056182068 ms/op 1.01
org.janusgraph.CQLMultiQueryBenchmark.getVerticesWithDoubleUnion 378.50150528122845 ms/op 379.4813964885073 ms/op 1.00
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesAllPropertiesWithUnlimitedBatch 4469.828604867447 ms/op 4530.814953048244 ms/op 0.99
org.janusgraph.CQLMultiQueryBenchmark.getNames 8501.11205647229 ms/op 8731.79753038062 ms/op 0.97
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesThreePropertiesWithAllMultiQuerySlicesUnderMaxRequestsPerConnection 6232.636750119746 ms/op 6137.169975047065 ms/op 1.02
org.janusgraph.CQLMultiQueryBenchmark.getLabels 7309.296714812649 ms/op 7683.931873747836 ms/op 0.95
org.janusgraph.CQLMultiQueryBenchmark.getVerticesFilteredByAndStep 427.13991639381413 ms/op 423.32886129669566 ms/op 1.01
org.janusgraph.CQLMultiQueryBenchmark.getVerticesFromMultiNestedRepeatStepStartingFromSingleVertex 13645.847283648334 ms/op 13033.313312605715 ms/op 1.05
org.janusgraph.CQLMultiQueryBenchmark.getVerticesWithCoalesceUsage 358.70462903553437 ms/op 364.90333773424464 ms/op 0.98
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesMultiplePropertiesWithAllMultiQuerySlicesUnderMaxRequestsPerConnection 15664.857641682123 ms/op 15551.17606992916 ms/op 1.01
org.janusgraph.CQLMultiQueryBenchmark.getIdToOutVerticesProjection 244.60802693519014 ms/op 244.5861905036132 ms/op 1.00
org.janusgraph.CQLMultiQueryMultiSlicesBenchmark.getValuesMultiplePropertiesWithUnlimitedBatch 15499.912950321203 ms/op 15842.185192153633 ms/op 0.98
org.janusgraph.CQLMultiQueryBenchmark.getNeighborNames 8404.206444068785 ms/op 8673.851588862552 ms/op 0.97
org.janusgraph.CQLMultiQueryBenchmark.getElementsWithUsingRepeatUntilSteps 9178.815673105271 ms/op 9511.654488061318 ms/op 0.97
org.janusgraph.CQLMultiQueryBenchmark.getAdjacentVerticesLocalCounts 8669.015105998787 ms/op 8914.607619451666 ms/op 0.97

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.