Optimize stock news display performance: - Cache text image to reduce rendering overhead - Improve frame creation and update logic - Optimize text wrapping for smoother scrolling - Remove unnecessary display clears

This commit is contained in:
ChuckBuilds
2025-04-11 10:40:02 -05:00
parent a7a341b479
commit f3975e1ac0
2 changed files with 41 additions and 23 deletions

View File

@@ -38,14 +38,9 @@ def main():
print("Testing news display. Press Ctrl+C to exit.")
# Run the news display in a loop with proper timing
last_update = time.time()
# Run the news display in a loop
while True:
current_time = time.time()
# Ensure we're not updating too frequently
if current_time - last_update >= 0.001: # 1ms minimum between updates
news_manager.display_news()
last_update = current_time
news_manager.display_news()
except KeyboardInterrupt:
print("\nTest interrupted by user")