If we open large files (e.g. log files) with highlight.current.word=1, then the editor can be frozen because it can be looking for all occurrences of the current word (word at the caret) (issue : http://sourceforge.net/tracker/index.php?func=detail&aid=3530365&group_id=2439&atid=102439)To avoid this problem, you have to turn off this feature. If you turn off, then you don't have anymore this useful feature for all open buffers.
Imho, a simple workaround can be proposed :If we associate struct currentWordHighlight to Buffer (into class Buffer) and not SciTE process (into class SciTEBase),
You can turn it off per-directory with local options.
I'd prefer to just limit search to an arbitrary amount of time, say 100 ms, with *NO* property to change this.
Do you think that is better to disable completely this feature?For example, if the file is larger than 500KB, then highlight.current.word is disabled.
You can turn it off per-directory with local options.I know, but you have to always open the file into directory with good local options. Because, if you forget to do that you editor can be frozen. From my point of view, I prefer automatic solution.
This solution is quite straightforward. But with this limitation, the user can be tricked because he see some highlighted occurrences but sometime (with slow computer or large file) all occurrences are not highlighted into the file.
Do you think that is better to disable completely this feature?For example, if the file is larger than 500KB, then highlight.current.word is disabled.
Although, to define this maximum size file for highlight current word,maybe the property max.file.size can be used (http://www.scintilla.org/SciTEDoc.html#property-max.file.size).
If the timer expires then all highlights should be removed.
I'd select 1 MB as a nice round number which would produce about a 250 ms lag for "style" in a file similar to src/Embedded.properties on my machine although it will be slower on an Atom.
Your Atom processor is faster than mine :). For the same file, the search take about 2,943372 seconds.
You can find the patch where the duration is limited to 250ms. If you prefer another duration, let me know it.
That sounds like a debug build instead of a release build or it could be a compiler difference. I'm using the free version of Visual C++ 2010.
MSVC doesn't like the assignment inside the conditional expression. The boolean variable doesn't seem to be needed.
I use GNU/Linux only. For compilation, I use the compilation defined by your makefile (no DEBUG=1 and no CLANG=1)
Try switching to UTF-8.
Try switching to UTF-8.Much more fast with UTF-8 : 0,056006
The case folder can be avoided by changing Editor::SearchInTarget to have a conditional expression:ScopedCaseFolder pcf((searchFlags & SCFIND_MATCHCASE) ? NULL : CaseFolderForEncoding());
Please find this enclosed patch.
Thanks, but I implemented this a bit differently by locating the case folder on the Document object so it would't be confused when changing documents. It also needs to free the case folder when setting the character set as case folding values may differ between, Latin1 and ISO-8859-7 (Greek), for example.
Committed.