Skip to content

Fix pycache not working on linux local dev boxes - #13342

Draft
cdrini wants to merge 1 commit into
internetarchive:masterfrom
cdrini:cdrini/dev/pyc-bytecode-caching
Draft

Fix pycache not working on linux local dev boxes#13342
cdrini wants to merge 1 commit into
internetarchive:masterfrom
cdrini:cdrini/dev/pyc-bytecode-caching

Conversation

@cdrini

@cdrini cdrini commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Neither the bind-mounted app source nor site-packages are writable by the container user on Linux, so every process start recompiled the entire import tree from scratch. Redirects caching to a dedicated, pre-owned volume and pre-warms it at image build time.

Technical

Total memory over time (non-solr containers, summed)

xychart-beta
    title "Total memory across non-solr containers (MB)"
    x-axis "Elapsed (s)" [0, 7, 15, 22, 29, 36, 44, 51, 58, 66, 73, 80, 87, 95, 102, 109, 116]
    y-axis "Memory (MB)" 0 --> 1400
    line [604 "before", 679, 671, 755, 1085, 955, 995, 1300, 918, 920, 923, 926, 921, 923, 922, 926, 920]
    line [633 "after", 616, 619, 628, 812, 885, 894, 797, 797, 797, 801, 804, 798, 804, 800, 803, 798]
Loading

The before line spikes harder mid-startup (peaking ~1.3GB around the reindex burst at 51s) than after (~895MB peak) — less to compile means less transient memory pressure during the busiest part of startup, not just a lower resting value.

Testing

Screenshot

Stakeholders

…tup cost

Neither the bind-mounted app source nor site-packages are writable by the
container user on Linux, so every process start recompiled the entire
import tree from scratch. Redirects caching to a dedicated, pre-owned
volume and pre-warms it at image build time.

Co-Authored-By: Drini Cami <cdrini@gmail.com>
@cdrini cdrini changed the title Pycache not working on linux local dev boxes Fix pycache not working on linux local dev boxes Aug 16, 2026
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