forked from genewildish/Mainline
Bug: PIL-based block height estimation causes severe performance degradation #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug: PIL-based block height estimation causes severe performance degradation
State: open | Author: david
Created: 2026-03-19
Problem
The
ViewportFilterStageinengine/pipeline/adapters/transform.pywas usingestimate_block_height()which uses PIL to render blocks and measure their height. This is extremely slow and causes:Root Cause
estimate_block_height()fromengine/render/blocks.pyrenders each headline as a full PIL image to measure its terminal height - this is expensive and unnecessary.Solution
Replace with simple word-wrap based estimation that:
Fix Applied
See commit that replaces
estimate_block_heightwithestimate_simple_height.Related Issues
This bug is now fixed.