Skip to content

Commit be44681

Browse files
committed
Add batch sizes to all transactional write operations for memory management
1 parent d13703a commit be44681

9 files changed

Lines changed: 9 additions & 9 deletions

cypher/GitLog/Add_CHANGED_TOGETHER_WITH_relationships_to_code_files.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ WHERE firstGitFile <> secondGitFile
88
CALL (firstCodeFile, secondCodeFile, gitChange) {
99
MERGE (firstCodeFile)-[pairwiseChange:CHANGED_TOGETHER_WITH]-(secondCodeFile)
1010
SET pairwiseChange = properties(gitChange)
11-
} IN TRANSACTIONS
11+
} IN TRANSACTIONS OF 750 ROWS
1212
RETURN count(*) AS pairCount

cypher/GitLog/Add_RESOLVES_TO_relationships_to_git_files_for_Java.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ WHERE gitFileName ENDS WITH codeFileName
2020
CALL { WITH git_file, code_file
2121
MERGE (git_file)-[:RESOLVES_TO]->(code_file)
2222
ON CREATE SET git_file.resolved = true
23-
} IN TRANSACTIONS
23+
} IN TRANSACTIONS OF 1000 ROWS
2424
RETURN count(DISTINCT codeFileName) AS numberOfCodeFiles
2525
,collect(DISTINCT codeFileName + ' <-> ' + gitFileName + '\n')[0..4] AS examples
2626
// RETURN codeFileName, gitFileName

cypher/GitLog/Add_RESOLVES_TO_relationships_to_git_files_for_Typescript.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ WHERE codeFileName ENDS WITH gitFileName
2222
CALL { WITH git_file, code_file
2323
MERGE (git_file)-[:RESOLVES_TO]->(code_file)
2424
ON CREATE SET git_file.resolved = true
25-
} IN TRANSACTIONS
25+
} IN TRANSACTIONS OF 1000 ROWS
2626
RETURN count(DISTINCT codeFileName) AS numberOfCodeFiles
2727
,collect(DISTINCT codeFileName + ' <-> ' + gitFileName + '\n')[0..4] AS examples
2828
// RETURN codeFileName, gitFileName

cypher/Typescript_Enrichment/Add_DEPENDS_ON_relationship_to_resolved_modules.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
ON MATCH SET resolvedDependsOn = dependsOn // Overwrites existing properties
1313
,resolvedDependsOn.cardinality = existingDependency.cardinality + dependsOn.cardinality // Add cardinalities
1414
,resolvedDependsOn.updated = true
15-
} IN TRANSACTIONS
15+
} IN TRANSACTIONS OF 1000 ROWS
1616
RETURN count(*) as resolvedDependencies

cypher/Typescript_Enrichment/Add_IS_IMPLEMENTED_IN_relationship_for_matching_declarations.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
WITH externalDeclaration, internalDeclaration
88
CALL { WITH externalDeclaration, internalDeclaration
99
MERGE (externalDeclaration)-[:IS_IMPLEMENTED_IN]->(internalDeclaration)
10-
} IN TRANSACTIONS
10+
} IN TRANSACTIONS OF 1000 ROWS
1111
RETURN count( DISTINCT externalDeclaration.globalFqn + ' -> ' + internalDeclaration.globalFqn) AS linkedDeclarationCount
1212
,collect(DISTINCT externalDeclaration.globalFqn + ' -> ' + internalDeclaration.globalFqn)[0..4] AS linkedDeclarationExamples
1313
//Debugging

cypher/Typescript_Enrichment/Add_IS_IMPLEMENTED_IN_relationship_for_matching_modules.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ WHERE equalGlobalFqn
4848
OR equalNameAndNpmPackage
4949
CALL { WITH module, externalModule
5050
MERGE (externalModule)-[:IS_IMPLEMENTED_IN]->(module)
51-
} IN TRANSACTIONS
51+
} IN TRANSACTIONS OF 1000 ROWS
5252
RETURN CASE WHEN equalGlobalFqn THEN 'equalGlobalFqn'
5353
WHEN equalModule THEN 'equalModule'
5454
WHEN equalNameWithoutNamespace THEN 'equalNameWithoutNamespace'

cypher/Typescript_Enrichment/Link_external_modules_to_corresponding_npm_dependency.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ UNWIND external_modules AS external_module
1111
MERGE (external_module)-[:PROVIDED_BY_NPM_DEPENDENCY]->(npm_dependency)
1212
SET external_module.npmPackage = npm_dependency.name
1313
,external_module.npmPackageVersion = npm_dependency.dependency
14-
} IN TRANSACTIONS
14+
} IN TRANSACTIONS OF 1000 ROWS
1515
RETURN totalNumberOfExternalModules
1616
,count(DISTINCT external_module.globalFqn) AS numberOfLinkedExternalModules
1717
,count(DISTINCT project.name) AS numberOfProjects

cypher/Typescript_Enrichment/Link_npm_dependencies_to_npm_packages.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WHERE npm_package.name = npm_dependency.name
88
AND NOT npm_package.name CONTAINS '}}'
99
CALL { WITH npm_package, npm_dependency
1010
MERGE (npm_dependency)-[:IS_DESCRIBED_IN_NPM_PACKAGE]->(npm_package)
11-
} IN TRANSACTIONS
11+
} IN TRANSACTIONS OF 1000 ROWS
1212
RETURN count(*) AS numberOfWrittenRelationships
1313
,count(DISTINCT npm_dependency) AS numberOfDistinctNpmDependencies
1414
,count(DISTINCT npm_package) AS numberOfDistinctNpmPackages

cypher/Typescript_Enrichment/Link_npm_packages_with_depends_on_relationships.cypher

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ WITH source
2121
CALL { WITH source, target, weightByDependencyType
2222
MERGE (source)-[dependsOnRelationship:DEPENDS_ON]->(target)
2323
SET dependsOnRelationship.weightByDependencyType = weightByDependencyType
24-
} IN TRANSACTIONS
24+
} IN TRANSACTIONS OF 1000 ROWS
2525
RETURN count(*) AS numberOfWrittenRelationships
2626
,count(DISTINCT source) AS numberOfDistinctSourcePackages
2727
,count(DISTINCT target) AS numberOfDistinctTargetPackages

0 commit comments

Comments
 (0)