Win32 DBCS optimization and code break up

Neil Hodgson <[email protected]> Thu, 27 Mar 2025 18:14:39 -0700 (PDT)
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
Case-insensitive search for East Asian DBCS encodings on Win32 has been 
sped up by a factor of around 5 times. This is done by caching character 
folding data and costs 64K for each DBCS code page used. There is no 
significant extra memory use if DBCS encodings are not used. This change 
may be extended to other platforms in the future.

The initial plan was to add cross-platform character folding data but, 
unfortunately, platforms and APIs vary in their behaviour and can be 
modified with OS patches and locale settings.

I believe the memory cost is justified by the improved performance and 
there may be more movement in this direction later. For example, a look-up 
table from DBCS encodings to Unicode and back may be implemented to avoid 
operating system calls for conversions.

The PlatWin.cxx file had become too large so has been broken up into 4 
files: SufaceGDI.cxx and SurfaceD2D.cxx contain drawing code for the Win32 
GDI and Direct2D/DirectWrite APIs; ListBox.cxx implements the 
autocompletion list box; and PlatWin.cxx retains the window, screen, menu, 
cursor, bitmap and platform-access functions.

Projects maintaining their own project or makefiles may need to make 
corresponding changes.

The committed changes can be examined either in the repositories

hg clone http://hg.code.sf.net/p/scintilla/code scintilla

or from

https://www.scintilla.org/scite.zip Source
https://www.scintilla.org/wscite.zip Windows executable (64-bit)

Neil

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/scintilla-interest/a6a2222a-f7a7-4135-aecd-5068b46b075en%40googlegroups.com.