Skip to content

memory leak on repeated observe of an array of times #1135

@kenta2

Description

@kenta2

Simplified testcase:

import numpy
from skyfield.api import load

eph = load('de440s.bsp')
timescale=load.timescale()

earth=eph['earth']
moon=eph['moon']
times=timescale.tt_jd(numpy.linspace(2400000,2500000,100000))
for i in range(1,500):
    obs=earth.at(times).observe(moon).apparent()
    print(i)

On my machine, this takes 10 minutes, and memory use keeps climbing, ending at 4 GB.

Skyfield 1.54 installed via pip install. Python 3.13.12 (Debian Forky Linux on amd64).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions