facelessuser / ColorHelper

Sublime plugin that provides helpful color previews and tooltips
https://facelessuser.github.io/ColorHelper/
MIT License
254 stars 30 forks source link

Very long lines bring ColorHelper (and Sublime) to a halt #257

Closed mataha closed 11 months ago

mataha commented 11 months ago

Description

Navigating through a file with very long lines (>1m) cause ColorHelper and, by extension, Sublime to become irresponsive and slow.

Support Info

- ST ver.: 4155
- Platform: windows
- Arch: x64
- Plugin ver.: 6.3.1
- Install via PC: True
- mdpopups ver.: 4.2.2

Steps to Reproduce Issue

  1. Download TiddlyWiki from here.
  2. Open the downloaded file in Sublime Text and navigate to line 154.
  3. Observe everything slow down and freeze.
facelessuser commented 11 months ago

Are you using word wrap? If so, try disabling it. If that doesn't help, try changing this setting from:

  "preview_window_padding": [20, 20],

to

  "preview_window_padding": [0, 0],
mataha commented 11 months ago

Disabling word wrap didn't help, but changing preview_window_padding did - thanks!

facelessuser commented 11 months ago

We probably need to use a better default. We recently extended padding to have some colors offscreen get rendered before you get to them, but with long-wrapped lines, this can be problematic. I think maybe we should allow extending padding for those that want it, but provide performant defaults.

facelessuser commented 11 months ago

Issue that introduced padding: https://github.com/facelessuser/ColorHelper/issues/249.

mataha commented 11 months ago

We probably need to use a better default. We recently extended padding to have some colors offscreen get rendered before you get to them, but with long-wrapped lines, this can be problematic. I think maybe we should allow extending padding for those that want it, but provide performant defaults.

Basically "preview_window_padding": [0, 0], right?

facelessuser commented 11 months ago

Yes