Sublime Text 2 chokes on long lines
-
inb4
So I was debugging a small issue in one of our apps, and I had to look at the trace log. The app dumped a base64 encoded file it had an issue with. The encoded file weighs about 40 MB, and is all in one line.
I try to open the file in Sublime text, and then I start waiting. And waiting. And waiting. "Huh. That's odd." Ctrl+Shift+Esc:
That's sublime, eating up a very impressive 8 GB to read a 40 MB file. And it takes forever to just scroll through it. With or without word wrap makes little difference.
I opened the file in notepad for comparison. Notepad takes 90 MB to read it (probably because it turns the UTF-8 file into Windows wide chars in memory, so it doubles in size).
Did it again for laughs, then checked the resource usage:
I had actually opened two of these. First time this system runs out of memory, and it's by opening two text files.
-
-
I bet Sublime interpreted it as Cool source file and compiled it to BIT.
[spoiler]And it compiled.[/spoiler]
-
8
killer-kilo-mega-bytes
-
I wonder if it's the same kind of thing that broke chrome a few weeks back?
-
Not a Sublime-specific issue. Pretty much every text editor and/or IDE I've ever tried has problems with really long lines. The good ones (like IntelliJ) at least warn you when loading such a file, the bad ones just crash.
-
You should try notepad. It handled the page like a champ, at least until I selected word wrap. Responsive and snappy.
-
problems with really long lines.
Do you know why?
I can't see any technical reason. Reading it line by line might be slow,but 8GB?
-
Offscreen video buffer.
-
Trying to identify the syntax highlighting to use? (I know that's Emacs' slowest part, but thanks to Eclipse, Emacs is now a lightweight application.)
-
You should try notepad. It handled the page like a champ, at least until I selected word wrap.
Funny, because enabling word wrap is what makes IntelliJ behave as usual when viewing such files.
(Actually, IIRC, it asks you to enable wrapping when loading the file.)
-
Not a Sublime-specific issue. Pretty much every text editor and/or IDE I've ever tried has problems with really long lines. The good ones (like IntelliJ) at least warn you when loading such a file, the bad ones just crash.
Last time I saw emacs have such problems was way back in the last century when 40M was about the size of a whole hard drive.
-
Emacs is a problem.
-
I bet it's the scrollbars! If they only implemented infiniscroll, I'm sure it would just work!
-
Look you're doing it wrong. Vim would of handled it just fine.
-
Choking on long lines is one of my reasons to hate Notepad++. EditPad Pro has no problems with them.
-
8 kilo-mega-bytes
No, it's kilo-meter-bytes. As in the number of bytes you can print on a stack of paper 1 km high.
-
No, it's kilo-meter-bytes. As in the number of bytes you can print on a stack of paper 1 km high.
In what font and at what size? Legal, letter, or something else? Margins? This is important, man! You can't just go leaving important stuff like that out of the specification! Who do you think we are, Initech?
-
-
-
Speaking of sensible paper I just discovered that the printer in our office can print on both sides. It prints one side, partially spits it out, sucks it back in and then prints the other side. I spent five minutes watching this this morning. I now have half the works of Shakespeare on my desk.
-
Better but I'm wondering if it will be big enough
-
It prints one side, partially spits it out, sucks it back in and then prints the other side
I guess we should welcome you in this century or something
-
I remember photocopiers doing it in the late 90's. I've just never worked anywhere that would fork out for something that useful. Christ fucking forbid that we actually not waste paper trying to get even/odd pages right.
-
I printed a lot today ... must have been 3 full pages
-
I remember photocopiers doing it in the late 90's. I've just never worked anywhere that would fork out for something that useful.
This'll blow your mind out of whatever printer timepod you live in then... ours can staple too.
-
OMFG! Our office manager would sell her soul for that!
-
My cheap laser printer at home does double-sided printing. Is it really not a standard feature on every printer/copier/fax or whatever that you'd find in an office?
-
Does your printer also ward off office managers. If so I would like to buy your printer.
-
The last thing I printed was RFC 5246, early this year. I don't recall the last time before that.
-
When I briefly worked at a copy shop, we had one that could print two-sided at 70 sheets a minute, full-color, could staple or punch 3-holes for binders, or the rectangle holes for those plastic binding strips. It was the God-printer.
It also was about 12'x6' and weighed perhaps 4 tons. And when it jammed, GODDAMNED did it jam. There was one time we pulled basically an entire ream from its various rollers. (The thing was so fast, it'd pull up 100 sheets from the feeder before the finisher could detect the jam, then those 100 sheets would just get crammed-in there against the original jam and you were in for a fun couple hours.)
-
I remember photocopiers doing it in the late 90's. I've just never worked anywhere that would fork out for something that useful.
My $150 Brother printer at home does the same thing.
It also was about 12'x6' and weighed perhaps 4 tons. And when it jammed, GODDAMNED did it jam. There was one time we pulled basically an entire ream from its various rollers.
We had a similar printer at the university I went to. It printed so fast that the output tray (which was 18 inches tall) would always have about 10 sheet in the process of falling. If you accidentally sent a PostScript file to it in text mode, it would print a ream of PS codes before you could cancel it.
-
partially spits it out, sucks it back in
My home printer also did this (canon ip 7250),when it works once in a while. I'm on my third printer now..
-
-
We had a similar printer at the university I went to. It printed so fast that the output tray (which was 18 inches tall) would always have about 10 sheet in the process of falling. If you accidentally sent a PostScript file to it in text mode, it would print a ream of PS codes before you could cancel it.
And then you'd have to retry it in postscript next month when your quota reset?
-
Speaking of sensible paper I just discovered that the printer in our office can print on both sides. It prints one side, partially spits it out, sucks it back in and then prints the other side. I spent five minutes watching this this morning. I now have half the works of Shakespeare on my desk.
And if you flip the sheets over you'll find the other half!
-
-
And then you'd have to retry it in postscript next month when your quota reset?
Oh man, I just had a flashback to printing a postscript Enterprise-D (I was 19. Shut up.) that took the printer an entire hour to process. Annoyed a few people waiting for their print job.
-
-
-
And if you flip the sheets over you'll find the other half!
OMG! Mind blown!You are bad and you should feel bad.
I felt bad until I had my morning caffaine injection. Does that count?
-
-
I felt bad until I had my morning caffaine injection. Does that count?
Was that before or after your morning caffeine injection?
-
I felt bad before the caffeine. After that I managed to summon the will to actually do some work.
-
Cuold somoene plaese maek a postt four eech speling andd grammer erorr in thhis plaese? Id wuold bee raelly helfpul + intresting too evreyone i thnik.
-
@accalia, someone needs a sockbot solution.
-
@accalia, someone needs a sockbot solution.
hmm..... doable....
but i'm not writing that module... i have few lines i'm unwilling to cross, one that leads to a lynch mob is one of them.
-
Yeah, that'd get annoying REAL quick, especially since a majority of the posts contain at least on "not-a-word" word...
-
hmm..... doable....
Can we hook it into YouTube comments and see if we can crash Google's servers with the sheer amount of comments the bot would make?
Filed under: your, then, too
-
Where is sockbot's code and what language is it in. I'm looking for something to do this weekend. ^_^