From b63bebf9c62a99ddf569d633937edeadb00e1016 Mon Sep 17 00:00:00 2001 From: sanchit3008 Date: Sat, 7 Dec 2024 21:45:22 +0530 Subject: [PATCH] optimize inline textwrap processing --- packages/core/src/modules/text.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/core/src/modules/text.ts b/packages/core/src/modules/text.ts index 7974f5fe..6aa0ed78 100644 --- a/packages/core/src/modules/text.ts +++ b/packages/core/src/modules/text.ts @@ -1649,6 +1649,8 @@ export function getCellTextInfo( } cumWordHeight += size.height; + // stop processing if rest of the cell isnt visible + if (cumWordHeight >= cellHeight) break; } }