-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Labels
bugSomething isn't workingSomething isn't working
Description
shiny currently bundles 1300+ files in it's wheel file. Here's a script to count them:
count.py
import subprocess
import zipfile
from collections import Counter
from pathlib import Path
# Build the wheel
subprocess.run(["python", "-m", "build", "--wheel"], check=True)
# Find the built wheel
dist = Path("dist")
wheel = max(dist.glob("*.whl"), key=lambda p: p.stat().st_mtime)
# Count files per top-level directory
counts = Counter()
with zipfile.ZipFile(wheel) as zf:
for name in zf.namelist():
top_dir = name.split("/")[0]
counts[top_dir] += 1
for dirname, count in sorted(counts.items()):
print(f"{dirname}: {count} files")This leads to slow deployment times on Connect since each file comes with about 5ms of latency (and 5*1400~=7sec)
Currently, there are 464 files under api-examples/, which don't need to be bundled with the wheel.
There is another good chunk of files (~300) under shiny/www/shared/sass/ that are only needed for Theme. We may want to consider moving those to another package that comes with the pip install "shiny[theme]"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working