Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"search_threshold" setting #146

Closed
andoro opened this issue Jan 31, 2014 · 4 comments
Closed

"search_threshold" setting #146

andoro opened this issue Jan 31, 2014 · 4 comments

Comments

@andoro
Copy link

andoro commented Jan 31, 2014

Hello!

My question is why did you set this limit to only 5000 characters?
I nearly removed your plugin because in some cases it didn't show the end of a tag in a larger >30000 character long HTML file.
The plugin works perfectly even in a 100000 character HTML too, so that's all!

@facelessuser
Copy link
Owner

My question is why did you set this limit to only 5000 characters?

I need an arbitrary limit. Not everyone's computer will perform the same. A conservative value will work on everyone's computer. That way people can evaluate that it works without it slowing down their machine. After they are satisfied, they can push it to its limits. The plugin can slow down typing etc. if the threshold is too big.

I nearly removed your plugin because in some cases it didn't show the end of a tag in a larger >30000 character long HTML file.
The plugin works perfectly even in a 100000 character HTML too, so that's all!

I worked hard to make it run with as little lag as I could, so yes the actual limit on some computers can be pushed well over what I set as default. I show in the readme that the threshold is configurable: https://github.com/facelessuser/BracketHighlighter#settings

I don't show this in the readme, but if you look in the settings file, you can ignore the threshold all together (I would not advise this though):

    // Ignore threshold
    "ignore_threshold": false,

Even if the threshold is there to protect against performance issues, on-demand plugin commands all ignore the threshold. So if you want to jump to the other bracket with the BH jump to left/right bracket command, this should work regardless of threshold setting. There is even an on-demand match command, so if BH doesn't match your bracket because the distance is too great, just use the match command and it will force the match.

In short, it is there to protect your performance first and foremost. Once you install it, you can push it to whatever limit you like.

@facelessuser
Copy link
Owner

Since the question was answered. I will close this issue.

@andoro
Copy link
Author

andoro commented Feb 1, 2014

Thx for your quick answer. I appreciate your hard work in connection with speed.
Well, you are right, the setting is there. I just wanted to tell you, if I were you I'd communicate this setting more highlighted (for new users) :)

@KostiantynKondratiuk
Copy link

Не работает(.

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

No branches or pull requests

3 participants