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

Serialization of ExecutionContext in GML loader slows down large load operations #1451

Open
stephanr opened this issue Jan 13, 2023 · 0 comments
Labels
bug error issue and bug (fix) tools deegree command line tools (CLI)

Comments

@stephanr
Copy link
Member

The storage of object IDs and references in order to later check the referential integrity of a load operation means that a large amount of IDs and references are stored in ExecutionContext.

private void putInContext( String featureId, List<String> references ) {
ExecutionContext executionContext = stepExecution.getExecutionContext();
if ( !executionContext.containsKey( FEATURE_IDS ) )
executionContext.put( FEATURE_IDS, new ArrayList<String>() );
( (List<String>) executionContext.get( FEATURE_IDS ) ).add( featureId );
if ( !executionContext.containsKey( REFERENCE_IDS ) )
executionContext.put( REFERENCE_IDS, new ArrayList<String>() );
( (List<String>) executionContext.get( REFERENCE_IDS ) ).addAll( references );
}

It was observed that during a large loading process (13 million objects), the time per chunk increased abruptly after approx. 30 minutes. During an analysis of a dump (.hprof) of the JVM it was determined that this is due to the serialization of the ExecutionContext.

For more background see spring documentation at https://docs.spring.io/spring-batch/docs/4.3.5/reference/html/index-single.html#executioncontext

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error issue and bug (fix) tools deegree command line tools (CLI)
Projects
None yet
Development

No branches or pull requests

1 participant