JonathanMurray / JonathanMurray/dialog-tree-py

All images are loaded (including ones that aren't used in the current script)

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
24
Forks
5
PR merge metrics
No merged PRs in 30d

Description

When starting up, all image files in the image directory are loaded into memory.

```
image_paths = os.listdir(IMG_DIR)
images = {path.split(".")[0]: load_image(path) for path in image_paths}
```

This makes startup slower, produces irrelevant logs and will grow as a problem if more image files are added to the repo.

Solution:
When starting up a script, only image files referenced in that script should be loaded.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.