General information:
if disable windows aero(use classic theme) than performance will increased on x5-x7
with mss.mss() as sct:
bbox = (0, 0, 1280, 720)
log.console_time('MSS_start')
for i in range(1000):
screenshot = np.array(sct.grab(bbox), copy=False, order='C')
log.console_time('MSS1_end')
#print(screenshot.flags)
for i in range(1000):
screenshot = np.ascontiguousarray(sct.grab(bbox))
log.console_time('MSS2_end')
#print(screenshot.flags)
for i in range(1000):
screenshot = np.array(sct.grab(bbox))
log.console_time('MSS3_end')
with aero
2023-01-15 21:06:37,407 | window_capture.py -> <module>():127 | MainThread | INFO : [!t] MSS_start _ default _ exec_time: 2.430 ms
2023-01-15 21:06:55,844 | window_capture.py -> <module>():130 | MainThread | INFO : [!t] MSS1_end _ default _ exec_time: 18437 ms
2023-01-15 21:07:14,344 | window_capture.py -> <module>():134 | MainThread | INFO : [!t] MSS2_end _ default _ exec_time: 18499 ms
2023-01-15 21:07:32,763 | window_capture.py -> <module>():138 | MainThread | INFO : [!t] MSS3_end _ default _ exec_time: 18418 ms
with classic theme
2023-01-15 21:08:02,949 | window_capture.py -> <module>():127 | MainThread | INFO : [!t] MSS_start _ default _ exec_time: 2.263 ms
2023-01-15 21:08:05,410 | window_capture.py -> <module>():130 | MainThread | INFO : [!t] MSS1_end _ default _ exec_time: 2460. ms
2023-01-15 21:08:07,895 | window_capture.py -> <module>():134 | MainThread | INFO : [!t] MSS2_end _ default _ exec_time: 2484. ms
2023-01-15 21:08:11,611 | window_capture.py -> <module>():138 | MainThread | INFO : [!t] MSS3_end _ default _ exec_time: 3715. ms
try tests on win10, win11 and other python versions and type results
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too