Sublime Forum

Dev Build 2028

#1

Dev Build 2028 is out now. There aren’t many changes, but if you’re working with files on a network share, especially a slow one, this release should make life better. As of 2028, opening files is, finally, entirely asynchronous - no IO is done in the main thread at all. While the file itself has always loaded async, there were until recently a few other bits of IO done in the main thread:

  • The syntax definition used to be loaded in the main thread, causing a hitch if that syntax hadn’t been loaded before in the current process. Build 2020 made this fully async.
  • Checks were done to check that the file existed, and, on Windows, to normalize the path name (for short->long names, and to ensure the correct case is being used).
  • The working directory was changed to that of the opened file.

The last two bits of IO have been removed in Build 2028. If you’re working over an especially slow network connection (as I was today, incidentally), then this is quite nice. It’s not so important if you’re working on local files, but you can feel the difference in Goto Anything - it’s buttery smooth now.

0 Likes

#2

This sounds really great, but I have also worked with files on a slow connection in the last few days, and my experience is that the file preview functionality in Goto File/Anything is the main reason that working on remote files is slow. Sometimes it takes seconds for each of the files to be previewed. It would be really great to be able to turn this off on the (main) folder level.

0 Likes

#3

In versions before 2028, Goto Anything would trigger blocking IO in the main thread (the bottom two items in the above list), because it’s opening files to do the previewing: a preview in Goto Anything loads files in the same manner as clicking on a file in an open folder on the side bar.

As of 2028, Goto Anything does no IO in the main thread. There’s no performance related reason to disable the file previewing.

0 Likes

#4

Hmm, I have documented the behavior I’m seeing in a quick screencast:

dl.dropbox.com/u/326491/st2_remote_files_lag.mov

The keystrokes aren’t captured, but that’s me typing stuff like “app con”, pressing ESC, typing “app con” again etc. as fast as I can. So I finish typing in less than a second, but have to wait for quite a few seconds while it goes over the network to preview the best match for every keystroke. Or so it seems, at least. Even after pressing ESC I have to wait a few seconds for the overlay to disappear. This is with build 2028 on OS X 10.6.6. Granted, the network connection is quite slow, but that’s the way I have to work sometimes, so it would be nice if switching files was quicker.

That said, I love the preview functionality for local files, which is super fast. I thought it was just a cool gimmick at first but I quickly found that it was really useful.

0 Likes

#5

Those delays shouldn’t be there: it’s just those issues that were fixed in 2028, at least on Linux, where I was doing most of the testing.

I have a suspicion the culprit is Cocoa: when setting the title bar, the done thing in Cocoa is to give it a full path name, so it can display the icon, show the folders when you Control+click on the icon, etc. It appears this is doing blocking IO: if a filename is passed to it that doesn’t exist, it behaves differently, which implies its stating the file at the very least. I’ll see what can be done about it.

0 Likes

#6

Not sure what build this showed up in, but I’m seeing the following behavior:

I’m editing a file (its basename appears under the Files tree), and I compile it using a custom build system. That system reports compile errors with the full path to the file. When I hit F4 or double click on the error in question, rather than going to the appropriate point in the already open file, it opens a new tab, which it lists in the Files tree as the full path to the file. The view in this tab is also completely empty.

Let me know if there’s any way I could provide you some extra debug data or better repro steps.

0 Likes

#7

2029 is out now, which addresses the blocking IO issue on OSX, at least for Goto Anything, by hiding the proxy icon while Goto Anything is active.

Also in 2029, the flicker when loading files via Goto Anything, where the file was first drawn as a blank sheet, and then redrawn when loaded, has been reduced. Files are now given up to 150ms to load before they’re forced to draw, which in many cases means Goto Anything will never display a blank sheet while a file is loading.

SJML: The F4 related issue should be fixed in 2029 too.

0 Likes

#8

There is a problem with the auto preview when you search a file.
If you match a binary file (like an image, an archive, or something else), it take very long time to render.
I think you should do something for that, like only process the first 20k of the file, or a filter to disable preview for some kind of file.
Or something else :smile:

0 Likes

#9

oxman

I added files I didn’t want to show previews in the file excludes pattern in User Global Preferences. So those don’t show previews. You can add folders to exclude also.

0 Likes

#10

I can confirm that this solved the issue for me. And you’re right–no need for a preference now :smile:

0 Likes

#11

I have just upgraded from version 1.4. Sublime Text 2 is awesome especially new Side Bar.

One minor usability improvement for Side Bar. Side Bar contains “FOLDERS” with project folders listed. Great. But to expand folder and see files inside you need to click on tiny arrow down button that is not easy to hit. Would it be easier to just expand folder as it is clicked or double-clicked?

0 Likes