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

Improve Map*Dao memory allocations [BATCH-2650] #953

Closed
spring-projects-issues opened this issue Nov 9, 2017 · 3 comments
Closed

Improve Map*Dao memory allocations [BATCH-2650] #953

spring-projects-issues opened this issue Nov 9, 2017 · 3 comments
Labels
in: core status: declined Features that we don't intend to implement or Bug reports that are invalid or missing enough details type: enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

Benoit opened BATCH-2650 and commented

When using a MapJobRepository the daos :

  • MapJobExecutionDao
  • MapStepExecutionDao
  • MapExecutionContextDao

are allocating unneeded memory when performing the object deep copy (see static copy methods)

First when re-allocating the internal buffer of the ByteArrayOutputStream
Then when copying it through ByteArrayOutputStream#toByteArray()

Those allocations show up when profiling our batch executions

I'd like to provide an efficient deep copy method based on classes available since spring 4.2
I'm ready to do the PR but where should I create this new method (to be shared between the Map*Dao) ?


Affects: 3.0.8, 4.0.0.RC1

@spring-projects-issues
Copy link
Collaborator Author

Michael Minella commented

Create a PR that just replaces the functionality. We can discuss how to share the method from there.

@spring-projects-issues
Copy link
Collaborator Author

Mahmoud Ben Hassine commented

The MapJobRepository is intended to be used only for testing and prototyping. Is it worth putting effort on it as suggested here?

@fmbenhassine
Copy link
Contributor

Map-based DAOs have been deprecated for removal (#3836), so I see no added value in putting effort on them for the rest of their short lifetime.

@fmbenhassine fmbenhassine added status: declined Features that we don't intend to implement or Bug reports that are invalid or missing enough details and removed status: waiting-for-triage Issues that we did not analyse yet labels Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core status: declined Features that we don't intend to implement or Bug reports that are invalid or missing enough details type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants