Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

The plugin slows down the opening of large files #6

Closed
jcaillon opened this issue Mar 11, 2017 · 3 comments
Closed

The plugin slows down the opening of large files #6

jcaillon opened this issue Mar 11, 2017 · 3 comments

Comments

@jcaillon
Copy link

First of all, thanks for this plugin; it works really well and is a huge help!

Description of the Issue

Opening a large file (or simply tab switching to a large file) with the plugin installed is much slower than opening it w/o the plugin.

Steps to Reproduce the Issue

  • Create a >100Mo file,
  • Open it without the plugin install.
  • Uninstall the plugin
  • Open the file again
  • Notice the difference of time needed for notepad++ to display it

Notes

If I may suggest two solutions;

  • Either add a new option to exclude file pattern (you currently have an option to include certain files pattern) -> this would allow me to exclude .log files for instance
  • Disable the mechanism on large files (check SCI_GETLENGTH on buffer switch?), add a setting to configure the max length allowed -> this would be the best solution imho

Thank you

@aaaxx
Copy link

aaaxx commented Mar 11, 2017

There's also the "dumb" option to only analyse a set number of buffers at a time for large files, and then when you scroll to the end of that range, analyse the next one and make the tabs wider if necessary.

I think this might be the best solution: you get the elastic tabs even for arbitrarily large files at a small cost of some columns nudging to the right occasionally as you scroll down – which is similar to what already happens in any file when the line-number margin widens as you reach the next power of 10 while scrolling.

@dail8859
Copy link
Owner

@aaaxx I agree this would probably be the best solution. I had tried this at one point but I eventually gave up. I might take another crack at it to see how it turns out. If I still can't get it right I'll at least implement some of the suggestions by @jcaillon.

@dail8859
Copy link
Owner

I've made some experimental changes in 58d744f that limits the amount of text processed, so this should perform noticeably better especially on large files, even during Find/Replacing (see #7). It does have have the side effect of some "column nudging" when scrolling, and code folding also is not taken into account at all. Currently it looks at 1 "screen" worth of text above and below the current screen. My guess is that this could be increased without much of a performance hit but wanted to see if anyone could test out the current changes to see how well it works. You can download the experimental releases below. Just extract and copy the DLL file.

ElasticTabstops.zip
ElasticTabstops_64.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants