linuxmint/xed

Xed full hang when opening binary or large text files (Such as a 22MB.json). Needs a bailout option or better large-file handling method instead of hanging the entire program pinning a host CPU to 100%.

ipaqmaster opened this issue · 4 comments

 * Xed version (xed --version)
xed - Version 3.4.1

 * Distribution - (Mint 17.2, Arch, Fedora 25, etc...)
Archlinux

Issue

Opening either large text based files or regular (Not so large) binary files causes Xed to entirely hang "Indefinitely" likely as it tries to parse the files with an encoding format and markup. If you wait long enough for binary files xed will theoretically eventually wake back up graphically and complain about the encoding of said files.

Steps to reproduce

Open either a large binary file such as an executable - or a regular text file of an exceedingly large filesize in Xed and watch a cpu hit 100% and Xed does not return in a meaningful time.

Expected behaviour

Open the content or advise the user that it's "Taking a long time to open, would you like to cancel?" Instead of effectively crashing while also bringing a CPU to 100%

Other information

Had to coredump Xed today just to get the text from my other "Unsaved Document" tabs because I accidentally opened a large debug Json file and the association was with Xed - causing my existing Xed process to hang "Theoretically indefinitely until killed" and held one of my CPU thread's at 100% while it struggled there.

This shouldn't be a problem. Xed should handle large files better or if easier, handle each file tab with their own child thread instead of hanging the entire single process when a big file gets opened and the process eventually killed - losing the data of other open text file tabs.

This seems to happen predominantly when Xed is trying to load a file with long lines. It was able to open my 22MB debug json after parsing the file with JQ (Many newlines) but as a one-lined file, Xed hangs indefinitely.

Great to see this problem entirely ignored for over 5 and a half years.

Looks like #174 found it an upstream issue... then give up the effort in downstream. I think even if GtkSourceView is no hope to speed up, there should be at least some way to make it not hang other tabs / other files opened in Xed, limiting the scope of damage.