Implement Smart Dependency Layer Splitting

Open
#33 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, python

Research direction

This is design work: start by reading the prerequisite issues #70 (local cache correctness) and #74 (importable runtime dependency staging), then the baseline measurement in #68, since the body says grouping heuristics should only come after those. No files or tests are named, so map the existing layer-generation path in the builder before proposing anything. Done means a configurable grouping strategy with measured cache-reuse numbers against the #68 baseline, not just a layer split.

Written by the indexing model from the issue text.

Description

enhancement performance

Description

Split dependency layer into frequently vs rarely changing dependencies for better cache hits.

Proposed Implementation

  • Analyze change frequency from git history
  • Separate core framework deps from app-specific deps
  • Create multiple dependency layers
  • Configurable grouping strategy

Example Layer Structure

  1. Base Python layer
  2. Core framework layer (Django, FastAPI - rarely changes)
  3. Common utilities layer (requests, etc.)
  4. App-specific dependencies
  5. Application code

Benefits

  • Better cache hit rates
  • Faster rebuilds when only app code changes
  • Optimized CI/CD performance

Parent: #49

Maintenance refresh: 2026-11-19

Prerequisites: correct local cache #70 and importable runtime dependency staging #74. Measure dependency-change reuse with baseline #68 before introducing grouping heuristics. Corrected the self-parent reference; performance parent is #49.

Dominant language
Python
Stars
10
Forks
1
Avg merge
1d 19h
Merged PRs (30d)
129

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spboyer/pycontainer-build

All issues in spboyer/pycontainer-build

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.