Skip to content

Some optimitzations - #18

Closed
Pacsfury wants to merge 10 commits into
Natuworkguy:devfrom
Pacsfury:main
Closed

Some optimitzations#18
Pacsfury wants to merge 10 commits into
Natuworkguy:devfrom
Pacsfury:main

Conversation

@Pacsfury

Copy link
Copy Markdown
Collaborator

Optimization summary

Applied some basic optimitzations to reduce ram and cpu usage.


  • engine/core/image.py:
    Added per-entity scaled-image caching so repeated draws at the same size reuse the transformed surface.
  • engine/core/init.py:
    Removed redundant scene empty flags and simplified Scene.update(), Scene.event(), and Scene.draw() loops.
    Cached the active scene in Game.step() to avoid repeated list indexing.
  • engine/build_tools.py:
    Replaced manual file open/close with Path.read_text() / Path.write_text().
  • engine/saveload.py:
    Used Path API consistently and simplified save/load flow.
    Added JSON indentation for saved project files.

@Pacsfury
Pacsfury changed the base branch from main to dev July 31, 2026 15:59
Comment thread engine/core/__init__.py
@Natuworkguy

Copy link
Copy Markdown
Owner

Approved commits have been made in dev branch.

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

Successfully merging this pull request may close these issues.

2 participants