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

Molfile creation is done by appending lines #184

Open
lpatiny opened this issue Nov 20, 2023 · 2 comments
Open

Molfile creation is done by appending lines #184

lpatiny opened this issue Nov 20, 2023 · 2 comments

Comments

@lpatiny
Copy link
Member

lpatiny commented Nov 20, 2023

I have an issue with the creation of molfile in memory. I'm creating 2500 molfile but in the memory heap snapshot it seems I have 9000000 entries

image

I think that in memory we keep all the different length of the string obtained during creation / concatenation:

https://github.com/cheminfo/openchemlib/blob/23bd145d76f2be249ea279415e2c59e54c965fba/src/main/java/com/actelion/research/chem/MolfileCreator.java#L201-L228

Does this makes sense ?

Is there a way to 'clean' the memory like doing something like JSON.parse(JSON.stringify(molfile)) ?

@targos WDYT ?

@lpatiny
Copy link
Member Author

lpatiny commented Nov 21, 2023

Need to check if flatstr (https://github.com/davidmarkclements/flatstr/blob/master/index.js) helps

@targos
Copy link
Member

targos commented Nov 21, 2023

If it does, I suggest to create an issue in the V8 tracker: https://bugs.chromium.org/p/v8/issues/list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants