Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

BSD Cafe Billboard

  1. Home
  2. Blogs
  3. Stop Opening Huge Files in Screen Editors

Stop Opening Huge Files in Screen Editors

Scheduled Pinned Locked Moved Blogs
4 Posts 4 Posters 145 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • r1w1s1R Offline
    r1w1s1R Offline
    r1w1s1
    wrote last edited by
    #1

    I came across this post:

    https://phanpy.social/#/hachyderm.io/s/115891592999188880

    It describes a very common situation: large SQL dumps, vim becoming
    unusable, and ed(1) suddenly making sense again.

    This is not accidental.

    Screen editors are designed for interactive, cursor-based editing.
    When files reach hundreds of megabytes or gigabytes, those assumptions break down.
    Startup cost, redraw, navigation, and internal structures become the real bottleneck.

    At that point, using tools like grep, sed, awk, or ed is not a
    workaround — it is the correct approach.

    Key idea:

    Large files do not require faster editors;
    they require different tools.
    

    Full note:
    https://codeberg.org/r1w1s1/code-notes/raw/branch/main/notes/Stop_Opening_Huge_Files_in_Screen_Editors.txt

    1 Reply Last reply
    5
    • naltunN Offline
      naltunN Offline
      naltun
      wrote last edited by
      #2

      Great reminder. I used vim to dig through a massive SQL dump during a CTF and although I performed well it wasn't without some headache.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        TomAoki
        wrote last edited by
        #3

        Maybe not so useful for many, but some screen editors are not good at handling looooong single line, even if the whole bunch of file size is small.

        An example of this situation would be copy (from terminal emulator) and paste to editor window the output from poudriere to see specific ports are included in skipped (or succeeded) ones on building a large number of ports. Built, ignored, failed, skipped ports has single output line respectively.

        In this specific cases, editors/leafpad (and IIRC, editors/pluma, too) locks up on horizontal scrolling (in case turned over at right end of window, vertical, too) or searching. devel/geany works fine.
        Just examples I've tried before.

        1 Reply Last reply
        1
        • mhdM Offline
          mhdM Offline
          mhd
          wrote last edited by
          #4

          As another data point in comparing how different editors work, here's an old one by the author of the very undervalued joe editor.

          In general, there's nothing preventing screen editors from working properly and fast here, it's just not something they optimized for. If they did it at all, internal editor data structures tend to be quite simple these days, as virtual memory works for most cases. People had to get a lot more tricky on smaller devices (or they gave up early, cf. Windows Notepad).

          Heretically, I'd also like to say that a lot of files that aren't binary and huge, different tools often wouldn't point at e.g. sed, as you're running into the old "Now they have two problems." issue then.

          1 Reply Last reply
          1

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups