Skip to content

Commit bb5eafc

Browse files
Little optimization in Frame rendering speed.
By explicitly specifying the size of the frame borders, computing layout dimensions is much quicker.
1 parent eced76b commit bb5eafc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

prompt_toolkit/widgets/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,9 @@ def has_title() -> bool:
535535
fill(width=1, height=1, char=Border.BOTTOM_LEFT),
536536
fill(char=Border.HORIZONTAL),
537537
fill(width=1, height=1, char=Border.BOTTOM_RIGHT),
538-
]
538+
],
539+
# specifying height here will increase the rendering speed.
540+
height=1,
539541
),
540542
],
541543
width=width,

0 commit comments

Comments
 (0)