OpenChemistry / OpenChemistry/stempy

Memory leak in io.load_electron_counts

Open
#185 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
26
Forks
12
Avg merge
1d 2h
Merged PRs (30d)
5

Description

I often will use the same notebook to look through many datasets without restarting the kernel.

I often run ee = stio.load_electron_counts(fullPath) and each time I run this the memory increases.

Using del ee does not release the memory. Running garbage collection import gc;gc.collect() also does not release the memory.

Is there a way to release the memory?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing repeated calls to io.load_electron_counts in a notebook, comparing process memory before and after deleting each result and running garbage collection. Trace the Python entry point into the C++ engine; done means repeated dataset loads no longer retain unreleased memory.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.