Skip to content

Improve build performance. Closes #796#798

Merged
regulartim merged 3 commits intodevelopfrom
build_performance
Feb 12, 2026
Merged

Improve build performance. Closes #796#798
regulartim merged 3 commits intodevelopfrom
build_performance

Conversation

@regulartim
Copy link
Copy Markdown
Collaborator

Description

This introduces two major changes to the build process:

  1. Use of a Debian-based image (instead of Alpine) in the backend where ML related packages are pre-compiled.
  2. Use layer caching in frontend, such that npm install is only triggered when package.json or package-lock.json change.

Build performance before the changes

Time: 4:52
RAM: 4,2 GB

Build performance after the changes

Time: 3:49
RAM: 2,9 GB

This seems like a small step but it's not. Just the bottleneck has changed: it is no longer the compilation of the python wheels but the deprecated react-scripts frontend build process. This will be solved in #783 .

Related issues

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist

  • I have read and understood the rules about how to Contribute to this project.
  • The pull request is for the branch develop.
  • I have added documentation of the new features.
  • Linter (Ruff) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved. All the tests (new and old ones) gave 0 errors.
  • If changes were made to an existing model/serializer/view, the docs were updated and regenerated (check CONTRIBUTE.md).
  • If the GUI has been modified:
    • I have a provided a screenshot of the result in the PR.
    • I have created new frontend tests for the new component or updated existing ones.

Important Rules

  • If you miss to compile the Checklist properly, your PR won't be reviewed by the maintainers.
  • If your changes decrease the overall tests coverage (you will know after the Codecov CI job is done), you should add the required tests to fix the problem
  • Everytime you make changes to the PR and you think the work is done, you should explicitly ask for a review. After being reviewed and received a "change request", you should explicitly ask for a review again once you have made the requested changes.

@regulartim regulartim requested a review from mlodic February 12, 2026 06:49
@regulartim regulartim marked this pull request as ready for review February 12, 2026 06:49
&& apt-get update \
&& apt-get install -y --no-install-recommends \
# Build dependencies (removed after pip install)
gcc python3-dev \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

just to be sure, py3-psycopg2 isn't required anymore?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, it's installed via pip on debian via project-requirements.txt.

@regulartim regulartim merged commit 6898f14 into develop Feb 12, 2026
4 checks passed
@regulartim regulartim deleted the build_performance branch February 12, 2026 17:13
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