refactor(main.py): update video preloading comment to reflect new approach and improve readability

This commit is contained in:
2025-09-04 21:47:56 +02:00
parent 25811834ea
commit 24c8021bd3

View File

@@ -529,14 +529,14 @@ class MediaGrader:
self.segment_current_frames[i] = start_frame # Start each segment at its position
print(f"Segment positions: {self.segment_positions}")
# Preload the entire video into memory with threaded I/O
# Preload the entire video into memory - simple and fast
print("Preloading entire video into memory...")
preload_start = time.time()
if self.current_cap and self.current_cap.isOpened():
self.current_cap.set(cv2.CAP_PROP_POS_FRAMES, 0)
# Read all frames in one shot - let OpenCV and OS handle buffering
# Simple, fast sequential read
frames = []
frame_count = 0