Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helix becomes very slow when the file contains ultra long lines #10826

Closed
ysooqe opened this issue May 27, 2024 · 1 comment
Closed

Helix becomes very slow when the file contains ultra long lines #10826

ysooqe opened this issue May 27, 2024 · 1 comment
Labels
C-bug Category: This is a bug

Comments

@ysooqe
Copy link

ysooqe commented May 27, 2024

Summary

Helix becomes unusuably slow when a file contains at least one super long line (millions of characters on that line).
I noticed this since I wanted to look through an XML file that had some serialized JPGs in it (where one serialized JPG resulted in a line length of about 8M characters).
I have uploaded a simple TXT file ( test.txt ) where the exact same thing happens.

I have looked through the other issues and found #338 as well as #3072 , but I am not entirely sure if this is related. The example-file I uploaded is only 7MB, but it already forces Helix to its knees.

Reproduction Steps

  1. Open the uploaded file with helix
  2. Try to move around (e.g. with hjkl)

Helix log

helix.log
2024-05-27T17:05:35.177 globset [DEBUG] glob converted to regex: Glob { glob: "*/Dockerfile.*", re: "(?-u)^.*/Dockerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('D'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-05-27T17:05:35.177 globset [DEBUG] glob converted to regex: Glob { glob: "*/dockerfile.*", re: "(?-u)^.*/dockerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('d'), Literal('o'), Literal('c'), Literal('k'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-05-27T17:05:35.177 globset [DEBUG] glob converted to regex: Glob { glob: "*/Containerfile.*", re: "(?-u)^.*/Containerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('C'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-05-27T17:05:35.177 globset [DEBUG] glob converted to regex: Glob { glob: "*/containerfile.*", re: "(?-u)^.*/containerfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('c'), Literal('o'), Literal('n'), Literal('t'), Literal('a'), Literal('i'), Literal('n'), Literal('e'), Literal('r'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-05-27T17:05:35.177 globset [DEBUG] glob converted to regex: Glob { glob: "*/BUILD.*", re: "(?-u)^.*/BUILD\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('B'), Literal('U'), Literal('I'), Literal('L'), Literal('D'), Literal('.'), ZeroOrMore]) }
2024-05-27T17:05:35.177 globset [DEBUG] glob converted to regex: Glob { glob: "*/.env.*", re: "(?-u)^.*/\\.env\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('.'), ZeroOrMore]) }
2024-05-27T17:05:35.177 globset [DEBUG] glob converted to regex: Glob { glob: "*/.envrc.*", re: "(?-u)^.*/\\.envrc\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('.'), Literal('e'), Literal('n'), Literal('v'), Literal('r'), Literal('c'), Literal('.'), ZeroOrMore]) }
2024-05-27T17:05:35.177 globset [DEBUG] glob converted to regex: Glob { glob: "*/Jenkinsfile.*", re: "(?-u)^.*/Jenkinsfile\\..*$", opts: GlobOptions { case_insensitive: false, literal_separator: false, backslash_escape: true, empty_alternates: false }, tokens: Tokens([ZeroOrMore, Literal('/'), Literal('J'), Literal('e'), Literal('n'), Literal('k'), Literal('i'), Literal('n'), Literal('s'), Literal('f'), Literal('i'), Literal('l'), Literal('e'), Literal('.'), ZeroOrMore]) }
2024-05-27T17:05:35.177 globset [DEBUG] built glob set; 1 literals, 0 basenames, 0 extensions, 0 prefixes, 121 suffixes, 5 required extensions, 8 regexes
2024-05-27T17:05:35.179 helix_view::clipboard [DEBUG] Using wl-copy+wl-paste to interact with the system and selection (primary) clipboard
2024-05-27T17:05:35.191 helix_vcs [INFO] Error {
    context: "failed to open git repo",
    source: Discover(
        NoGitRepository {
            path: "/home/<user>",
        },
    ),
}
2024-05-27T17:05:35.191 helix_vcs [INFO] failed to open diff base for /home/<user>/test.txt
2024-05-27T17:05:35.191 helix_vcs [INFO] Error {
    context: "failed to open git repo",
    source: Discover(
        NoGitRepository {
            path: "/home/<user>",
        },
    ),
}
2024-05-27T17:05:35.191 helix_vcs [INFO] failed to obtain current head name for /home/<user>/test.txt
2024-05-27T17:05:35.191 helix_view::editor [DEBUG] editor status: Loaded 1 file.
2024-05-27T17:05:35.192 helix_tui::backend::crossterm [DEBUG] The keyboard enhancement protocol is supported in this terminal (checked in 95.482µs)
2024-05-27T17:05:35.850 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-05-27T17:05:35.851 helix_term::application [DEBUG] received editor event: IdleTimer
2024-05-27T17:05:38.220 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-05-27T17:05:38.220 helix_term::application [DEBUG] received editor event: IdleTimer
2024-05-27T17:05:39.971 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-05-27T17:05:39.972 helix_term::application [DEBUG] received editor event: IdleTimer
2024-05-27T17:05:41.650 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-05-27T17:05:41.650 helix_term::application [DEBUG] received editor event: IdleTimer
2024-05-27T17:05:43.576 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-05-27T17:05:43.577 helix_term::application [DEBUG] received editor event: IdleTimer
2024-05-27T17:05:43.984 helix_term::commands::typed [DEBUG] quitting...
2024-05-27T17:05:44.644 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-05-27T17:05:45.882 helix_view::document [DEBUG] id 1 modified - last saved: 0, current: 0
2024-05-27T17:05:46.165 helix_term::job [DEBUG] waiting on jobs...
2024-05-27T17:05:46.165 helix_term::job [DEBUG] waiting on jobs...

Platform

Linux

Terminal Emulator

foot version: 1.17.2 +pgo +ime +graphemes -assertions

Installation Method

Arch Linux official repository package

Helix Version

helix 24.3

@ysooqe ysooqe added the C-bug Category: This is a bug label May 27, 2024
@kirawi
Copy link
Member

kirawi commented May 27, 2024

Duplicate of #4513

@kirawi kirawi marked this as a duplicate of #4513 May 27, 2024
@kirawi kirawi closed this as not planned Won't fix, can't repro, duplicate, stale May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

2 participants