Attached are two patches:
1. Allow specifying PositionCache initial size in constructor. This avoids unnecessary allocating memory twice on Editor class construction.
2. Use separate PositionCache for printing in order to stop invalidating PositionCache that's used for screen.
I don't see these as big enough wins to be worth applying.
1. Fixes bad coding. You're allocating memory first in PositionCache constructor, just to trash it away immediately afterwards by calling SetSize() method in Editor constructor.
2. This may seem small to you, since you're only thinking about SciTE-like applications that use single instance for all documents in which case PositionCache gets invalidated anyway on every document switch. However, applications that use one instance per document can afford to keep PositionCache valid quite longer and there is no need to trash it on every call to FormatRange. The same goes for the first patch, in SciTE you're only performing double allocation twice, while applications that use one instance per document will perform double allocation on every new document.