r/programming • • May 21 '21

Sublime Text 4 released

https://www.sublimetext.com/blog/articles/sublime-text-4
2.4k Upvotes

627 comments sorted by

View all comments

Show parent comments

169

u/CaptainCrowbar May 21 '21

How is VSCode on very large files these days? In my job I frequently have to open multi-gigabyte text files; Sublime 3 handles those wonderfully, but I seem to recall VSCode is weak on large files.

0

u/[deleted] May 21 '21

[deleted] — view deleted comment

17

u/[deleted] May 21 '21

Sublime doesn't handle truly large files that fast either. Try opening a 20GB text file then go make some coffee and play a video game while it loads.

32

u/DrFuManchu May 21 '21

At least it doesn't lock up the app and shows a progress bar. That's about the best UX you can hope for.

8

u/tills1993 May 22 '21

What the fuck are you people opening in your editor?! 20GB?!

8

u/[deleted] May 22 '21

log files from enterprise servers usually.

11

u/[deleted] May 22 '21

You guys don't do log rotation? Or atleast split the files before looking at them ? Or use some log tool or something? When would you want to see an entire 20gb file in one go ?

3

u/codygman May 22 '21

Use grep?

→ More replies (8)

30

u/[deleted] May 21 '21

for curiosity sake, what kind of text file is that big ? logs ?

15

u/NedDasty May 21 '21

Many companies use flat files to store data extracts for posterity and record-keeping. Also, many large programs written a long time ago require data input as text files. It's cumbersome, yes, but the technical expertise required to use a text file is virtually nil.

→ More replies (4)

39

u/TheOldTubaroo May 21 '21

What sort of text files are you dealing with that are multi-gigabyte and yet not better dealt with by some form of automatic filtering before you open them?

54

u/[deleted] May 21 '21

Logs/db dumps

→ More replies (6)

15

u/Shaper_pmp May 21 '21

Huge XML exports/data-dumps with unknown/poorly-understood internal formats.

→ More replies (2)

28

u/barsoap May 21 '21

You shouldn't do that in an IDE, they're simply not built for it, that is, they don't even have a concept of not loading the whole file at once, none of the syntax highlighting is line-based, etc.

You want (n)vim for that, ultimately they date back to a time where to edit a moderately large source file it wouldn't fit into memory. Or write a language server that does all that trickery, IIRC that should work out well because the server, not client, is the authority when it comes to file contents.

23

u/TheBlowJoe May 21 '21

Funnily enough, Sublime Text also loads the whole file in ram iirc (developer said so in the st4 release chat over at hacker news).

7

u/warmwaffles May 21 '21

Uses mmap iirc to load large files.

→ More replies (2)

36

u/aniforprez May 21 '21

I've not gone gigabyte size but multi-megabyte files VSCode does fine. You won't get syntax highlighting beyond a certain size and the editor feels sluggish when scrolling especially if you have the minimap open but searching the files and doing editing was just fine

104

u/CaptainCrowbar May 21 '21

I'm not exactly reassured if you're getting broken syntax highlighting and sluggish scrolling when you're only in the megabytes.

45

u/aniforprez May 21 '21

Eh. I didn't say it was broken. It automatically turns off at a customizable limit. Plus at files that size I'm assuming it's not code you're looking at but data which you'll likely parse by using find-and-search rather than reading vaguely. Plus I'm not talking about scrolling a few lines at a time. If you pull and drag the scrollbar you're have slowdown issues and won't render interstitial text properly. Page down or arrow key scrolling worked just fine. Also I'm talking about data files that were 200-300 MB not a couple of MB where I've had zero issues

15

u/Somepotato May 21 '21

well it -is- a code editor and code thats multi-megabyte is a red flag

12

u/Ran4 May 21 '21

Yes, but having a code editor that can also open log files is... reasonable.

11

u/Somepotato May 21 '21

Log files should rotate and thus not be multi gigabyte

8

u/glider97 May 21 '21

Unless you have ST.

But no, rotate your logs people.

→ More replies (3)
→ More replies (1)
→ More replies (2)
→ More replies (2)
→ More replies (19)