Skip to content

Commit 522d1e6

Browse files
committed
fixes #764 Adding tcell as a dependency delays startup time
We no longer bother to create the lookup table for runewidth. I had expected this to make a significant difference, but I'm finding that it does not, but it does make the startup time even for applications that only import and never create a screen, considerably worse. Dozens of milliseconds, even up to half a second. Applications that need this (persumably some heavy Emoji or EastAsian users) can solve for themselves by importing the runewidth package (same version) and calling the CreateLUT method.
1 parent 807ae5d commit 522d1e6

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

cell.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,4 @@ func init() {
246246
if os.Getenv("RUNEWIDTH_EASTASIAN") == "" {
247247
runewidth.DefaultCondition.EastAsianWidth = false
248248
}
249-
250-
// For performance reasons, we create a lookup table. However, some users
251-
// might be more memory conscious. If that's you, set the TCELL_MINIMIZE
252-
// environment variable.
253-
if os.Getenv("TCELL_MINIMIZE") == "" {
254-
runewidth.CreateLUT()
255-
}
256249
}

0 commit comments

Comments
 (0)