aziz / SublimeFileBrowser

Ditch sidebar and browse your files in a normal tab with keyboard, like a pro!
MIT License
394 stars 46 forks source link

The file list jumps every couple of seconds #146

Closed Reinmar closed 6 years ago

Reinmar commented 6 years ago

This started to happen to me recently after one of the automatic updates:

mar-27-2018 21-43-00

I'm using macOS 10.13.3, Sublime 3143, FileBrowser 0.8.4.

vovkkk commented 6 years ago

Try to ‘Disable auto-refresh for this view’ in context menu.

It seems like you have constantly changing contents like logger maybe; when SFB refreshes a view, it removes text and re-paste the fresh listing, thus it looks like a jump while in fact it is erasing & pasting happen fast. I do not think we can fix it properly, because getting rid of this jump will not only increase complexity significantly to pinpoint filesystem changes into view (currently we just rebuild the whole list and that’s it), but also it may increase CPU usage because editing a view is relatively heavy operation esp. in case of many consecutive calls such as erase/replace/insert #63

Reinmar commented 6 years ago

Try to ‘Disable auto-refresh for this view’ in context menu.

It helped. But I need to do it every time I open SFB so it's not a solution to me.

What I don't understand is why this changed recently. It means that this change was caused by an update in SFB or some other package or ST3 itself.

Reinmar commented 6 years ago

It seems that this might've changed in https://github.com/aziz/SublimeFileBrowser/commit/9b1cda7f864d3faf5c4889b0057b5439abdbd7a8. So, the fact that I didn't notice any issues was in fact a bug.

Can I disable auto refresh via a config? Also, what's the point of auto refresh if it causes such a behaviour?

vovkkk commented 6 years ago

Can I disable auto refresh via a config?

https://github.com/aziz/SublimeFileBrowser#auto-refresh

what's the point of auto refresh if it causes such a behaviour?

The point is to make a view display the actual content of a directory automatically, e.g. if you create a new file with save as feature of ST then without refresh SFB view won’t contain the new file unless you refresh manually with r.

Reinmar commented 6 years ago

https://github.com/aziz/SublimeFileBrowser#auto-refresh

Thanks! I was confused because I thought that it's an ST3's option. Changing it in SFB's config helps.

The point is to make a view display the actual content of a directory automatically, e.g. if you create a new file with save as feature of ST then without refresh SFB view won’t contain the new file unless you refresh manually with r.

What I meant is that the autorefresh option's usefulness is unclear to me – I assumed that many people have the problem with excessive rendering. In such a case, the whole feature would not be very useful. But perhaps there's something specific in my project which causes these re-renders. I'm not sure what, though. The only thing which comes to my mind is the number of symlinks.

Reinmar commented 6 years ago

Anyway, thanks for your help! I love SFB :)