From fd2623102a9bad31258a0ef31ce6a2972ae6ddad Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 2 Feb 2022 14:25:51 +1100 Subject: Feature [feature-requests:#1427] Add multithreaded layout which improves performance significantly for very wide lines. --- doc/ScintillaDoc.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 58e8da944..932d26de8 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -7449,6 +7449,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_GETLAYOUTCACHE → int
SCI_SETPOSITIONCACHE(int size)
SCI_GETPOSITIONCACHE → int
+ SCI_SETLAYOUTTHREADS(int threads)
+ SCI_GETLAYOUTTHREADS → int
SCI_LINESSPLIT(int pixelWidth)
SCI_LINESJOIN
SCI_WRAPCOUNT(line docLine) → line
@@ -7687,6 +7689,21 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ so that their layout can be determined more quickly if the run recurs. The size in entries of this cache can be set with SCI_SETPOSITIONCACHE.

+

SCI_SETLAYOUTTHREADS(int threads)
+ SCI_GETLAYOUTTHREADS → int
+ The time taken to measure text runs on wide lines can be improved by performing the task + concurrently on multiple threads when + SC_SUPPORTS_THREAD_SAFE_MEASURE_WIDTHS + is available. + This can be a dramatic improvement - a 4 core processor is often able to reduce text layout time to just over one + quarter of the single-threaded time.

+

The default is to use just the main thread but applications may call SCI_SETLAYOUTTHREADS + to specify the maximum number of threads to use. + The number of threads is limited to the hardware concurrency of the system - + for a 4 core processor with hyper-threading that would be 8. + If an application just wants maximum concurrency then call with a large number + SCI_SETLAYOUTTHREADS(1000) and that will be reduced to a reasonable value.

+

SCI_LINESSPLIT(int pixelWidth)
Split a range of lines indicated by the target into lines that are at most pixelWidth wide. Splitting occurs on word boundaries wherever possible in a similar manner to line wrapping. -- cgit v1.2.3