Skip to content

perf(pypkg): precompile Python bytecode cache#1060

Merged
DavidePrincipi merged 1 commit intomainfrom
pycache
Jan 28, 2026
Merged

perf(pypkg): precompile Python bytecode cache#1060
DavidePrincipi merged 1 commit intomainfrom
pycache

Conversation

@DavidePrincipi
Copy link
Member

Compile NS8 Python libraries at install and update time to improve agent startup speed and page cache sharing.

Compile NS8 Python libraries at install and update time
to improve agent startup speed and page cache sharing.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Python bytecode precompilation to improve NS8 agent startup performance and page cache sharing by compiling Python libraries at install and update time.

Changes:

  • Add bytecode compilation during initial core installation
  • Add bytecode compilation during core updates to refresh the cache

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
core/imageroot/var/lib/nethserver/node/install-core.sh Adds Python bytecode compilation for NS8 libraries during initial installation
core/imageroot/var/lib/nethserver/node/update-core.d/50python_updates Adds Python bytecode compilation for NS8 libraries during core updates

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DavidePrincipi DavidePrincipi added the testing Start test suite label Jan 28, 2026
@DavidePrincipi DavidePrincipi marked this pull request as ready for review January 28, 2026 10:08
@DavidePrincipi DavidePrincipi merged commit bdbe4cf into main Jan 28, 2026
13 checks passed
@DavidePrincipi DavidePrincipi deleted the pycache branch January 28, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Start test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant