Skip to content

Commit a835c58

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 6cb00fe commit a835c58

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
@@ -529,7 +529,9 @@ def has_title() -> bool:
529529
fill(width=1, height=1, char=Border.BOTTOM_LEFT),
530530
fill(char=Border.HORIZONTAL),
531531
fill(width=1, height=1, char=Border.BOTTOM_RIGHT),
532-
]
532+
],
533+
# specifying height here will increase the rendering speed.
534+
height=1,
533535
),
534536
],
535537
width=width,

0 commit comments

Comments
 (0)