Skip to content
Snippets Groups Projects
Commit 97e973ef authored by George Nachman's avatar George Nachman
Browse files

Enable double-width character line cache and number-of-lines caching by...

Enable double-width character line cache and number-of-lines caching by default for everyone (used to be on by default only for nightly build users with random correctness checks, but the checks have been passing for a while with 0 assertions)
parent 099e36bc
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -92,8 +92,7 @@ void EnableDoubleWidthCharacterLineCache() {
- (void)commonInit {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
if ([iTermAdvancedSettingsModel dwcLineCache] ||
[NSBundle it_isNightlyBuild]) {
if ([iTermAdvancedSettingsModel dwcLineCache]) {
gEnableDoubleWidthCharacterLineCache = YES;
gUseCachingNumberOfLines = YES;
}
Loading
Loading
@@ -569,19 +568,6 @@ int OffsetOfWrappedLine(screen_char_t* p, int n, int length, int width, BOOL may
if (metadata->width_for_number_of_wrapped_lines == width &&
metadata->number_of_wrapped_lines > 0) {
spans = metadata->number_of_wrapped_lines;
#warning Remove this when I feel confident it is correct
if (arc4random_uniform(100) < 10) {
// Correctness checking code follows. Remove this for speed when I think it's correct.
int referenceSpans = NumberOfFullLines(buffer_start + prev,
length,
width,
_mayHaveDoubleWidthCharacter);
if (spans != referenceSpans) {
ILog(@"Metadata gives number of wrapped lines = %@ for width %@ while reference = %@", @(metadata->number_of_wrapped_lines), @(width), @(referenceSpans));
assert(false);
}
}
} else {
spans = NumberOfFullLines(buffer_start + prev,
length,
Loading
Loading
@@ -610,15 +596,6 @@ int OffsetOfWrappedLine(screen_char_t* p, int n, int length, int width, BOOL may
bufferLength:length
width:width
metadata:&metadata_[i]];
#warning Remove this when I feel confident it is correct
if (arc4random_uniform(100) < 10) {
int correctOffset = OffsetOfWrappedLine(buffer_start + prev,
*lineNum,
length,
width,
_mayHaveDoubleWidthCharacter);
assert(offset == correctOffset);
}
} else {
offset = OffsetOfWrappedLine(buffer_start + prev,
*lineNum,
Loading
Loading
Loading
Loading
@@ -258,8 +258,6 @@ DEFINE_INT(badgeTopMargin, 10, @"Badge: Top Margin for the badge\nHow much space
 
#pragma mark - Experimental Features
DEFINE_BOOL(includePasteHistoryInAdvancedPaste, YES, @"Experimental Features: Include paste history in the advanced paste menu.");
// This used to be on by default. Experiment with setting to to NO: it'll make ssh nicer.
DEFINE_BOOL(tolerateUnrecognizedTmuxCommands, NO, @"Experimental Features: Tolerate unrecognized commands from server.\nNormally, an unknown command from tmux will not end the session. Turning this off helps detect dead ssh sessions.");
DEFINE_BOOL(serializeOpeningMultipleFullScreenWindows, YES, @"Experimental Features: When opening multiple fullscreen windows, enter fullscreen one window at a time.");
DEFINE_BOOL(useAdaptiveFrameRate, YES, @"Experimental Features: Use adaptive framerate.\nWhen throughput is low, the screen will update at 60 frames per second. When throughput is higher, it will update at 30 frames per second.");
Loading
Loading
@@ -271,6 +269,7 @@ DEFINE_BOOL(hideStuckTooltips, YES, @"Experimental Features: Hide stuck tooltips
DEFINE_BOOL(showYellowMarkForJobStoppedBySignal, YES, @"Experimental Features: Use a yellow for a Shell Integration prompt mark when the job is stopped by a signal.");
DEFINE_BOOL(openFileOverridesSendText, YES, @"Experimental Features: Should opening a script with iTerm2 disable the default profile's “Send Text at Start” setting?\nIf you use “open iTerm2 file.command” or drag a script onto iTerm2's icon and this setting is enabled then the script will be executed inl lieu of the profile's “Send Text at Start” setting. If this setting is off then both will be executed.");
 
DEFINE_BOOL(dwcLineCache, YES, @"Experimental Features: Enable cache of double-width character locations?\nThis should improve performance. It is always on in nightly builds. You must restart iTerm2 for this setting to take effect.");
// This is half implemented and should not be turned on by default.
DEFINE_BOOL(useLayers, NO, @"Experimental Features: Use Core Animation layers for opaque terminal views");
 
Loading
Loading
@@ -282,6 +281,5 @@ DEFINE_BOOL(useGCDUpdateTimer, YES, @"Experimental Features: Use GCD-based updat
DEFINE_BOOL(drawOutlineAroundCursor, NO, @"Experimental Features: Draw outline around underline and vertical bar cursors using background color.");
DEFINE_BOOL(killSessionsOnLogout, NO, @"Experimental Features: Kill sessions on logout.\nA possible fix for issue 4147.");
DEFINE_BOOL(detectPasswordInput, NO, @"Experimental Features: Show key at cursor at password prompt?");
DEFINE_BOOL(dwcLineCache, NO, @"Experimental Features: Enable cache of double-width character locations?\nThis should improve performance. It is always on in nightly builds. You must restart iTerm2 for this setting to take effect.");
 
@end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment