feat: Optimize ADB exec-out and OCR performance

- Introduced performance enhancements for ADB exec-out, reducing execution time by 10-20% through the use of Popen with streaming reads, increased buffer sizes, and removal of unnecessary fsync calls.
- Implemented optimizations in OCR processing, cutting recognition time by 50% by refining button recognition logic and improving image loading and preprocessing methods.
- Added detailed performance diagnostics and configuration options to facilitate further optimizations.
- Created new documentation files outlining the performance improvements and recommendations for future enhancements.
This commit is contained in:
Your Name committed 2026-01-02 02:06:01 +08:00
1 parent 148cdf56c2
commit a0aad21835
67 files changed
+1689 -351

No files matched your search

+2 -2
View File
@@ -1165,7 +1165,7 @@ class ProcRunner:
ops = underlying_operations()
self._append_log(f"[启动] 自动截图: device={device_id}")
result = ops.get_screenshot(device_id)
result = ops.get_screenshot(device_id, use_service=False)
if result:
self._append_log("[启动] 截图成功,已保存到 pic/screenshot.png")
else:
@@ -1795,7 +1795,7 @@ class Handler(BaseHTTPRequestHandler):
from Underlying_Operations import underlying_operations
ops = underlying_operations()
result = ops.get_screenshot(device_id)
result = ops.get_screenshot(device_id, use_service=False)
if result:
return self._send_json({"ok": True, "message": "截图成功"})
else: