4 ms·
Have been using Sublime Text 2 for years now and then last year tried out Sublime Text 3 (various builds). Sublime Text 3 (still in Beta), for me, has issues wh
by winteriscoming 10y ago
Have been using Sublime Text 2 for years now and then last year tried out Sublime Text 3 (various builds). Sublime Text 3 (still in Beta), for me, has issues when it comes to loading text files which are around 20MB in size (or more). It just freezes or takes a very long time to load (on my Linux machine). Haven't seen the same issue with Sublime Text 2, which has been a very good editor. I understand that Sublime Text 3 is in beta, but it's the only version that's made available via the official repos on LinuxMint installations. So I had to manually switch to Sublime Text 2 to have a stable working editor.
- smcleod 10y agoThat's truly interesting, I load HUGE (I mean stupidly huge, like multi-hundred MB) files into ST3 and have done for years without issue, even on a relatively low spec machine like my base MacBook (non-pro, gutless as anything) it's quite acceptable.
- winteriscoming 10y agoGiven that I was able to consistently see this issue when I was using Sublime Text 3, I'll see if I can come up with something more concrete to show/report this issue, over some weekend.
- mrmondo 10y agoYes and I don't disbelieve you either, I'm just wondering if it's perhaps something like interaction with a specific file system or disk scheduler that might be causing a block level locking issue, it's a bit of a stab in the dark without knowing anything about your setup but I build quite a few storage systems and have experienced some fun interactions with IO blocking.
- nodesocket 10y agoI would guess it is probably a Sublime plugin trying to syntax highlight or lint your 20MB file. What is the extension of the file?
- winteriscoming 10y agoJust had a quick look at one of the files which I remember was giving me trouble. The file extension is .txt. I will boot up the machine on which I have ST3 installed and give it a try pretty soon.
- winteriscoming 10y agoI think I have narrowed this issue down now. Earlier I had assumed this affects all files of certain size, since when I had run into this I was involved in a project where I had to look at certain textual content (dumped out of DB as JSON). That content was generated by one of the in-house dump tools. I had a closer look at one of the files just now and now have a simple python script which consistently reproduces this issue with ST3. Here's the python script which generates a file which can then be opened in ST3 and timed. content = 'a' with open('content.txt', 'w') as f: for x in range(1, 18888789): f.write(content) It took me 39 seconds (consistently) to open it. The generated file size is less than 20MB. The problem appears to be that ST3 slows down while loading this file which just has 1 huge line. If I tweak that script to change the content from 'a' to 'a\n' to include a new line within the content, the generated file loads relatively quickly and in reasonable time (around 6 seconds for the 37MB odd file). I admit, this now I think can be considered a corner case but when I ran into this pretty frequently, I just assumed this happens with all files with such sizes. As for why I believed ST2 doesn't have this issue - I'm not sure anymore, because when I try these files now with ST2 it too behaves similarly. I no longer work on that project which generated these files so had it no been for this thread, I would never have bothered to dig deeper into this and would have just stuck with ST2 :)