perf: reduce portable build size ~40MB — replace winsdk/wmi, migrate cv2 to Pillow
Some checks failed
Lint & Test / test (push) Failing after 19s
Some checks failed
Lint & Test / test (push) Failing after 19s
- Replace winsdk (~35MB) with winrt packages (~2.5MB) for OS notification listener. API is identical, 93% size reduction. - Replace wmi (~3-5MB) with ctypes for monitor names (EnumDisplayDevicesW) and camera names (SetupAPI). Zero external dependency. - Migrate cv2.resize/imencode/LUT to Pillow/numpy in 5 files (filters, preview helpers, kc_target_processor). OpenCV only needed for camera and video stream now. - Fix DefWindowProcW ctypes overflow on 64-bit Python (pre-existing bug in platform_detector display power listener). - Fix openLightbox import in streams-capture-templates.ts (was using broken window cast instead of direct import). - Add mandatory data migration policy to CLAUDE.md after silent data loss incident from storage file rename without migration.
This commit is contained in:
@@ -37,7 +37,6 @@ dependencies = [
|
||||
"python-dateutil>=2.9.0",
|
||||
"python-multipart>=0.0.12",
|
||||
"jinja2>=3.1.0",
|
||||
"wmi>=1.5.1; sys_platform == 'win32'",
|
||||
"zeroconf>=0.131.0",
|
||||
"pyserial>=3.5",
|
||||
"psutil>=5.9.0",
|
||||
@@ -61,9 +60,13 @@ dev = [
|
||||
camera = [
|
||||
"opencv-python-headless>=4.8.0",
|
||||
]
|
||||
# OS notification capture
|
||||
# OS notification capture (winrt packages are ~2.5MB total vs winsdk's ~35MB)
|
||||
notifications = [
|
||||
"winsdk>=1.0.0b10; sys_platform == 'win32'",
|
||||
"winrt-Windows.UI.Notifications>=3.0.0; sys_platform == 'win32'",
|
||||
"winrt-Windows.UI.Notifications.Management>=3.0.0; sys_platform == 'win32'",
|
||||
"winrt-Windows.Foundation>=3.0.0; sys_platform == 'win32'",
|
||||
"winrt-Windows.Foundation.Collections>=3.0.0; sys_platform == 'win32'",
|
||||
"winrt-Windows.ApplicationModel>=3.0.0; sys_platform == 'win32'",
|
||||
"dbus-next>=0.2.3; sys_platform == 'linux'",
|
||||
]
|
||||
# High-performance screen capture engines (Windows only)
|
||||
|
||||
Reference in New Issue
Block a user